Webpack 学习记录-01

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!

posted @ 2017-05-29 12:00  小鱼小小梦  阅读(698)  评论(0编辑  收藏  举报