|
|
@ -5,9 +5,11 @@ const HtmlWebpackPlugin = require("html-webpack-plugin"); |
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
entry: [ |
|
|
|
entry: [ |
|
|
|
"react-hot-loader/patch", |
|
|
|
"react-hot-loader/patch", |
|
|
|
|
|
|
|
"webpack-dev-server/client?http://localhost:8080", |
|
|
|
|
|
|
|
"webpack/hot/only-dev-server", |
|
|
|
"./app/script/index.tsx" |
|
|
|
"./app/script/index.tsx" |
|
|
|
], |
|
|
|
], |
|
|
|
devtool: "sourcemap", |
|
|
|
devtool: "inline-source-map", |
|
|
|
output: { |
|
|
|
output: { |
|
|
|
path: path.resolve(__dirname, "dist"), |
|
|
|
path: path.resolve(__dirname, "dist"), |
|
|
|
filename: "bundle.js" |
|
|
|
filename: "bundle.js" |
|
|
@ -32,12 +34,7 @@ module.exports = { |
|
|
|
new webpack.NamedModulesPlugin(), |
|
|
|
new webpack.NamedModulesPlugin(), |
|
|
|
new webpack.HotModuleReplacementPlugin() |
|
|
|
new webpack.HotModuleReplacementPlugin() |
|
|
|
], |
|
|
|
], |
|
|
|
externals: { |
|
|
|
|
|
|
|
"react": "React", |
|
|
|
|
|
|
|
"react-dom": "ReactDOM" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
devServer: { |
|
|
|
devServer: { |
|
|
|
hot: true, |
|
|
|
hot: true |
|
|
|
contentBase: "./dist" |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |