Open sprewell20051116 opened 7 years ago
最關鍵的錯誤應該是
- configuration.output.path: The provided value "./build" is not an absolute path!
所以嘗試去修改 webpack.config.js
改成
+ const path = require('path');
module.exports = {
entry: ['babel-polyfill', './app/index.js'],
output: {
- path: './build',
+ path: path.resolve(__dirname, 'build'), // if the above line does not work, try `path: __dirname + '/build'`
filename: 'bundle.js'
}
}
$npm run build
Error