代码拉取完成,页面将自动刷新
const path = require('path');
var webpack = require("webpack");
module.exports = {
context: __dirname,
entry: "./test/dev-hook.jsx",
output: {
path: '/',
filename: "bundle.js",
sourceMapFilename: "[file].map",
},
module: {
loaders: [
{test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader',
query: {
cacheDirectory: true,
plugins: [
['react-transform',
{
transforms: [
{
transform: 'react-transform-hmr',
imports: ['react'],
locals: ['module']
}
]
}
]
]
}
}
]
},
plugins: [
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify('development')
}
}),
],
devtool: "eval",
devServer: {
publicPath: '/',
compress: true,
port: 4002
},
resolve: {
extensions: [".webpack.js", ".web.js", ".js", ".jsx"],
alias: {
'react-grid-layout': path.join(__dirname, '/index-dev.js')
}
}
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。