我正在使用webpack来编译ES6的反应应用程序。我最近购买了MacBook Pro,并且建造时间增加了超过100秒。有没有人知道这一点,因为我使用相同的webpack.config.js? 这是我的webpack.config.js:
devtool: 'eval',
entry: [path.resolve(__dirname, 'app.js')],
output: {
path: "../../../../public",
filename: "app.js"
},
resolve: {
root: [
'./node_modules/'
],
extensions: ['', '.js', '.jsx']
},
module: {
loaders: [
{
test: [/\.js$/],
loader: 'babel',
exclude: /node_modules/,
query: {
presets: ['react', 'es2015']
}
}
]
},
plugins: [
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
})
]
节点版本:v0.10.48
Npm版本:2.15.1
的package.json:
"name": "app",
"version": "0.1.0",
"author": "Dev-Team",
"license": "MIT",
"scripts": {},
"devDependencies": {
"babel-core": "~6.7.*",
"babel-loader": "~6.2.*",
"babel-preset-es2015": "~6.6.*",
"babel-preset-react": "~6.5.*",
"webpack": "^1.13.3",
"webpack-dev-server": "~1.14.*"
},
"dependencies": {
"babel-polyfill": "~6.7.*",
"flux": "^2.1.1",
"history": "^4.3.0",
"react": "^15.3.0",
"react-addons-css-transition-group": "^15.0.0",
"react-autosuggest": "^6.1.0",
"react-bootstrap": "^0.30.5",
"react-button": "^1.2.1",
"react-dnd": "^2.1.4",
"react-dnd-html5-backend": "^2.1.2",
"react-dnd-touch-backend": "^0.3.3",
"react-dom": "^15.3.0",
"react-dropzone": "^3.7.0",
"react-geosuggest": "^2.0.0",
"react-google-maps": "^6.0.1",
"react-router": "^2.8.1",
"superagent": "^2.3.0",
"whatwg-fetch": "^0.11.0"
}