forked from pgn127/ReactGoogleDocs
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathwebpack_overview.js
More file actions
36 lines (32 loc) · 762 Bytes
/
webpack_overview.js
File metadata and controls
36 lines (32 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
webpack
a thing that lets you run require. It is basically a resource loader.
var React = require('react');
const webpack = require('webpack');
require css page on app.js right before ReactDOM render!!
- Needs CSSloader
module.exports = {
entry: './reactApp/app.js', <--- this is where webpack knows where to begin
output: {
path: __dirname + '/build',
filename: 'app.bundle.js'
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['react', 'es2015']
}
}
},
{ test: /\.s?css$/, loader: 'style-loader!css-loader' },
]
},
stats: {
colors: true
},
devtool: 'source-map'
};