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/page" is not an absolu
te path!
? ?-> The output directory as **absolute path** (required).
---------------------
以上提示的意思是:輸出路徑必須是絕對(duì)路徑
這是原配置文件中的代碼:
var webpack = require("webpack");
module.exports = {
"entry": {
? ? ? ? index : './js/demo01.js'
? ? },
? ? //入口文件輸出配置
? ? "output": {
? ? ? ? path: 'dist/js/page',//此處應(yīng)該修改為?path: __dirname+'/dist/js/page'
? ? ? ? filename: '[name].js'
? ? },
"module": {
? ? ? ? rules: [
? ? ? ? ? ? {
? ? ? ? ? ? ? ? test: /\.scss$/,
? ? ? ? ? ? ? ? loader:'style-loader!css-loader!sass-loader'
? ? ? ? ? ? }
? ? ? ? ]
? ?}
}
---------------------
作者:田江
來源:CSDN
原文:https://blog.csdn.net/jiang7701037/article/details/80682386
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!
作者:田江
來源:CSDN
原文:https://blog.csdn.net/jiang7701037/article/details/80682386
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請(qǐng)附上博文鏈接!