Webpack 2.0系列
1,output path路径必须为absolute path.
{ entry: ‘./src/app.js‘, output: { filename: ‘bundle.js‘, path: __dirname + ‘/build‘ } }
output.path
The output directory as an absolute path (required).
若写为: path:"./dist/js" 则报错如下:
Invalid configuration object. Webpack has been initialised using a configuration
object that does not match the API schema.
- configuration.context: The provided value "./dist/js" is not an absolute path!
时间: 2024-11-10 14:56:23