-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
43 lines (43 loc) · 1.22 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
const webpack = require('webpack');
const path = require('path')
module.exports = {
devtool:'eval-source-map',
entry:['babel-polyfill','whatwg-fetch',__dirname + '/src/index.js'],
output: {
path:path.resolve("../resources"),
filename: "index.js"
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env.NODE.ENV': "development"
})
],
module: {
loaders: [
{
test: /\.js$/,
exclude: /node_modules/,
loaders: 'babel-loader',
query: {
presets: [ 'react','es2015','stage-0'],
plugins: ["transform-class-properties",["import", { libraryName: "antd", style: false}]]
}
},
{
test: /\.css$/,
exclude: /node_modules/,
loader: "style-loader!css-loader?modules"
}
]
},
devServer:{
// contentBase:path.join(__dirname, "build"),
contentBase:__dirname + "/build",
historyApiFallback:true,
hot:true,
inline:true,
port:3006,
// host:'10.1.1.127'
}
};