-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
40 lines (37 loc) · 877 Bytes
/
webpack.config.js
File metadata and controls
40 lines (37 loc) · 877 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
37
38
39
40
var webpack = require( "webpack" );
module.exports = {
context: __dirname,
entry: [
"./src/App.js",
],
output: {
path: __dirname,
publicPath: "/",
filename: "static/js/bundle.js",
},
module: {
loaders: [
{ test: /\.(js|jsx)$/, loader: "babel?presets[]=es2015", exclude: /node_modules/ },
{ test: /\.(css|scss)$/, loaders: [
"style?sourceMap",
"css?modules&localIdentName=[name]__[local]&importLoaders=2",
"postcss",
"sass"
], exclude: /node_modules/ },
{ test: /\.(woff\d?|eot|ttf|svg)$/, loader: "file" },
{ test: /\.(png|jpg|gif)$|images\/.*\.svg$/i, loader: 'url?limit=8192' },
],
},
postcss: function () {
return [require( "autoprefixer" )];
},
resolve: {
extensions: [ "", ".js", ".jsx", ".json" ],
modulesDirectories: [
"node_modules",
"custom_modules",
"assets",
"components"
]
},
};