第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定

按照老師的寫webpack.config.js后運(yùn)行報(bào)錯(cuò)

錯(cuò)誤是

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!

有沒有大神知道這個(gè)是為啥啊

正在回答

9 回答

var htmlWebpackPlugin = require('html-webpack-plugin');

var path = require('path');

module.exports = {

? ? entry: './src/script/main.js',

? ? output:{

? ? ? ? ?path:path.resolve(__dirname,'./dist/js'),

? ? ? ? ?filename:'[name].js'

}

}


0 回復(fù) 有任何疑惑可以回復(fù)我~

我這個(gè)問題前面跟你的錯(cuò)誤一樣,后面就不一樣了。不知道怎么改。

Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.

?- configuration.module.rules[3].use should be one of these:

? ?non-empty string | function | object { ident?, loader?, options?, query? } | function | [non-empty string | function | object { ident?, loader?, options?, query? }]

? ?-> Modifiers applied to the module when rule is matched

? ?Details:

? ? * configuration.module.rules[3].use should be a string.

? ? * configuration.module.rules[3].use should be an instance of function

? ? * configuration.module.rules[3].use should be an object.

? ? * configuration.module.rules[3].use should be an instance of function

? ? * configuration.module.rules[3].use[0] should be a string.

? ? * configuration.module.rules[3].use[0] should be an instance of function

? ? * configuration.module.rules[3].use[0] has an unknown property 'option'. These properties are valid:

? ? ? object { ident?, loader?, options?, query? }


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

快樂的小牛妞

你是不是用的loaders ,改成rules
2018-12-05 回復(fù) 有任何疑惑可以回復(fù)我~
path:?"./dist/js"
改為:
path:?__dirname?+"/dist/js"


3 回復(fù) 有任何疑惑可以回復(fù)我~

webpack版本的問題,可以改成path: __dirname + '/dist/js',

2 回復(fù) 有任何疑惑可以回復(fù)我~

直接

path: path.resolve(__dirname, 'dist'),

不要./dist

0 回復(fù) 有任何疑惑可以回復(fù)我~

少了個(gè)? var path = require('path') 的引入

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

狂龍治中

看錯(cuò)了。。。
2017-07-16 回復(fù) 有任何疑惑可以回復(fù)我~

./dist/js 把前面一點(diǎn)去了也可以?/dist/js?

1 回復(fù) 有任何疑惑可以回復(fù)我~
#1

向前走不回頭 提問者

嗯嗯,我加了.之后輸出到項(xiàng)目外面去了,把.去了之后就好了,謝謝啊
2017-07-14 回復(fù) 有任何疑惑可以回復(fù)我~

也可能你沒有建dist這個(gè)文件夾

0 回復(fù) 有任何疑惑可以回復(fù)我~

output:{

????path:路徑錯(cuò)誤

}

不知道是不是,把代碼復(fù)制出來看看,比較容易看那里錯(cuò)了

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

向前走不回頭 提問者

找到原因了,path路徑錯(cuò)了
2017-07-14 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

按照老師的寫webpack.config.js后運(yùn)行報(bào)錯(cuò)

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)