码迷,mamicode.com
首页 > Web开发 > 详细

Webpack 学习记录-01

时间:2017-05-29 12:55:11      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:logs   invalid   obj   javascrip   script   java   required   direct   text   

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!

Webpack 学习记录-01

标签:logs   invalid   obj   javascrip   script   java   required   direct   text   

原文地址:http://www.cnblogs.com/happyfish321/p/6917704.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!