-
Notifications
You must be signed in to change notification settings - Fork 17
/
webpack.config.js
44 lines (40 loc) · 1.01 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
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: [
"webpack-dev-server/client?http://localhost:9090",
"webpack/hot/only-dev-server",
"./src/index"
],
// This will not actually create a bundle.js file in ./client. It is used
// by the dev server for dynamic hot loading.
output: {
path: __dirname + "/client/",
filename: "app.js",
publicPath: "http://localhost:9090/client/"
},
// entry:'./src/main.jsx',
// output: {
// path: './client',
// filename: 'bundle.js'
// },
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['react-hot','babel-loader'],
exclude: /node_modules/
},{
test:/\.css$/,
loader:"style!css"
}]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
// new ExtractTextPlugin('style.css', { allChunks: true })
new webpack.NoErrorsPlugin()
],
}