-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
39 lines (38 loc) · 1.02 KB
/
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 webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
context: path.join(__dirname, "src"),
devtool: "inline-source-map",
entry: "./scripts/app.jsx",
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0'],
plugins: ['react-html-attrs', 'transform-decorators-legacy', 'transform-class-properties'],
}
},{
test: /\.scss$/,
//No sourcemaps because of https://github.com/webpack/style-loader/issues/55
// loaders: ['style', 'css?sourceMap', 'sass?sourceMap']
loaders: ['style', 'css', 'sass']
}]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
output: {
path: __dirname + "/src/",
filename: "app.min.js"
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
favicon: 'favicon.ico'
})
]
};