forked from yinxin630/fiora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
34 lines (33 loc) · 1008 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
const autoprefixer = require('autoprefixer');
module.exports = {
entry: './src/client/webPc/index.js',
output: { path: './public', filename: 'app.js' },
module: {
loaders: [
{
test: /\.js|\.jsx?$/,
loader: 'babel-loader',
query: {
presets: ['es2015', 'stage-0', 'react'],
},
},
{
test: /\.(css)$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader'],
},
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'postcss-loader', 'resolve-url', 'sass-loader'],
},
{
test: /\.(png|jpg|gif)$/,
loader: 'url-loader',
},
{
test: /\.svg/,
loader: 'svg-url-loader',
},
],
},
postcss: [autoprefixer({ browsers: ['last 2 versions'] })],
};