4 changed files with 44 additions and 3 deletions
@ -1,15 +1,34 @@
|
||||
const webpack = require('webpack'); |
||||
const path = require('path'); |
||||
|
||||
module.exports = { |
||||
devtool: 'inline-source-map', |
||||
entry: { |
||||
'index': [ |
||||
'react-hot-loader/patch', |
||||
'webpack-dev-server/client?http://localhost:2000', |
||||
'webpack/hot/only-dev-server', |
||||
'./src', |
||||
] |
||||
}, |
||||
output: { |
||||
path: path.resolve(__dirname,'web'), |
||||
publicPath: '/web/', |
||||
publicPath: '/public/', |
||||
filename: 'js/[name].js' |
||||
}, |
||||
plugins: [ |
||||
new webpack.HotModuleReplacementPlugin(), |
||||
new webpack.NamedModulesPlugin() |
||||
], |
||||
module: { |
||||
rules: [ |
||||
{ test: /\.jsx?$/, use: [ 'babel-loader', ], exclude: /node_modules/ }, |
||||
{ test: /\.css$/, use: [ 'style-loader', 'css-loader?modules', ], }, |
||||
], |
||||
}, |
||||
resolve: { |
||||
extensions: [".js","jsx",".json"], |
||||
mainFiles: ["index"] |
||||
} |
||||
} |
||||
|
||||
|
||||
Loading…
Reference in new issue