-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
45 lines (43 loc) · 1.13 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
40
41
42
43
44
45
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var entry_path = path.resolve(__dirname, './app/src/js/index.js')
var output_path = path.resolve(__dirname, './app/build/');
module.exports = {
entry: entry_path,
output:{
path: output_path,
filename:'bundle.js',
publicPath: '/app/build/'
},
devServer:{
contentBase: __dirname,
},
devtool:'source-map',
module:{
loaders:[
{
test: /\.js$/,
loader:'babel-loader',
exclude: path.resolve(__dirname,'./node_modules/'),
query:{
presets:['es2015', 'react']
}
},
{
test:/\.css$/,
//loader:'css-loader',
use:['css-loader']
},
{
test: /\.html$/,
exclude: path.resolve(__dirname,'./node_modules/'),
use: [ 'html-loader' ]
}
]
}/*,
plugins: [
new HtmlWebpackPlugin({
template: './index.html'
})
]*/
};