打包的时候报以下错误:
Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
- configuration.output.path: The provided value "./dist/js" is not an absolute path!
2.以下是demo资源文件及配置:
请问大神们,这是什么情况啊?
const path = require('path');
path: path.resolve(__dirname, 'dist')
_dirname是什么
需要用绝对路径
问题已经解决,output path 需要require引入才行,不过看讲师写的不需要require也是可以的啊,为什么我的不行呢? 有知道的还请帮忙回答一下,谢谢
path:'/dist/js' 试试