有一个反应项目,一切都已配置,其他开发人员都工作正常,但我保存时没有自动页面更新。
webpack.config.js
var webpack = require('webpack');
module.exports = {
entry: ['babel-polyfill', './src/index.js'],
plugins: process.env.NODE_ENV === 'production' ? [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin()
] : [],
output: {
path: './public/js',
filename: 'bundle.js',
publicPath: '/js'
},
watch: true,
watchOptions: {
aggregateTimeout: 100
},
module: {
loaders: [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader?presets[]=es2015&presets[]=react'
},
{
test: /\.css$/,
loader: "style!css"
}
]
},
devtool: "inline-source-map"
};
的package.json
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build --env=production",
"test_build": "react-scripts build --env=testing",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
我正在使用Ubuntu 16.04