-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
39 lines (37 loc) · 975 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
var path = require("path");
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var extractPlugin = new ExtractTextPlugin({
filename: 'main.css'
})
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/dist',
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
use: [
{
loader: "babel-loader",
options: { //conf for babel-loader
presets: ["react", "es2015", "stage-2"]
}
}
]
},
{
test: /\.scss$/,
use: extractPlugin.extract({
use: [ "css-loader", "sass-loader"]
})
}
]
},
plugins: [
extractPlugin
]
}