-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
44 lines (42 loc) · 1.44 KB
/
webpack.config.js
File metadata and controls
44 lines (42 loc) · 1.44 KB
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
//var HtmlWebpackPlugin = require('html-webpack-plugin');
var webpack = require('webpack');
module.exports = {
//devtool: 'cheap-eval-source-map',
entry: [
'webpack-dev-server/client?http://localhost:8080',
'webpack/hot/only-dev-server',
//'webpack/hot/dev-server',
'./src/js/test.js'
],
output: {
path: './js',
filename: "bundle.js",
//publicPath: __dirname + "./js/lib"
},
module: {
loaders: [
//{ test: /\.js?$/, loaders: ['react-hot', 'babel'], exclude: /node_modules/ },
// { test: /\.js?$/, loaders: ['babel'], exclude: /node_modules/ },
//{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
{ test: /\.scss$/, loader: 'style!css!sass?sourceMap' },
{ test: /\.css$/, loader: "style!css" },
{ test: /\.(png|jpg|gif)$/, loader: 'file-loader?limit=2048' },
{ test: /\.html$/, loader: "raw-loader" }
]
},
resolve: {
extensions: ['', '.js', '.json', '.scss', '.css', '.html']
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.HotModuleReplacementPlugin(),
/*new HtmlWebpackPlugin({
template: './index.html'
})*/
]
/*,
devServer: {
contentBase: './src',
hot: true
}*/
};