-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
48 lines (46 loc) · 1004 Bytes
/
webpack.config.js
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
41
42
43
44
45
46
47
48
const path = require('path');
const webpack = require('webpack');
var featureFlags = new webpack.DefinePlugin({
__DEV__: true,
__PROD__: false,
});
module.exports = {
debug: true,
entry: [
'webpack-dev-server/client?http://localhost:8080',
'./src/index',
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'static/app.js',
publicPath: '/',
},
module: {
loaders: [
{
test: /\.css$/,
loader: 'style-loader!css-loader!postcss-loader',
},
{
test: /\.svg$/,
loader: 'file?name=[name].[ext]&context=./dist',
},
{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel-loader',
}
],
},
postcss: function (webpack) {
return [
require('autoprefixer')(),
require("postcss-import")({ addDependencyTo: webpack }),
require("postcss-cssnext")(),
];
},
plugins: [featureFlags],
resolve: {
extensions: ['', '.js', '.json'],
},
};