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

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

執(zhí)行npm run build報(bào)錯(cuò)


ERROR in ./src/app.vue
Module Error (from ./node_modules/vue-loader/lib/index.js):
vue-loader was used without the corresponding plugin. Make sure to include VueLo
aderPlugin in your webpack config.
?@ ./src/index.js 2:0-27 8:17-20

ERROR in ./src/app.vue?vue&type=style&index=0&lang=css& 16:0
Module parse failed: Unexpected character '#' (16:0)
You may need an appropriate loader to handle this file type.
|
|
> #test{
|?????? color: red;
| }
?@ ./src/app.vue 4:0-63
?@ ./src/index.js

ERROR in ./src/app.vue?vue&type=template&id=5ef48958& 2:0
Module parse failed: Unexpected token (2:0)
You may need an appropriate loader to handle this file type.
|
> <div id="test">{{text}}</div>
|
?@ ./src/app.vue 1:0-82 11:2-8 12:2-17
?@ ./src/index.js


------------------------------------

??? module:{
?? ??? ?rules:[
?? ??? ??? ?{
?? ??? ??? ??? ?test:/.vue$/,
?? ??? ??? ??? ?loader: 'vue-loader'
?? ??? ??? ?}
?? ??? ?]
?? ?}

這個(gè)已經(jīng)配置了

正在回答

4 回答

const?path?=?require('path')
const?VueLoaderPlugin?=?require('vue-loader/lib/plugin');

module.exports?=?{
????entry:path.join(__dirname,'src/index.js'),
????output:{
????????filename:'bundle.js',
????????path:path.join(__dirname,'dist')
????},
????module:{
????????rules:[
????????????{
????????????????test:/\.vue$/,
????????????????loader:'vue-loader'
????????????},
????????????{
????????????????test:/\.css$/,
????????????????loader:?'css-loader'
????????????}
????????]
????},
????plugins:?[new?VueLoaderPlugin()]
}


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

慕粉3436126

按照這樣改了,還是同樣的報(bào)錯(cuò)
2019-04-14 回復(fù) 有任何疑惑可以回復(fù)我~
#2

噯哭曖鬧 回復(fù) 慕粉3436126

按照他們的操作還報(bào)錯(cuò),那你在上面的基礎(chǔ)上加上 { test: /\.css$/, use: [ 'style-loader', 'css-loader' ] }, 然后在命令行里面安裝這里面所需要的loader(style-loader,css-loader)好像就可以了,你可以試試
2019-04-16 回復(fù) 有任何疑惑可以回復(fù)我~

第一步在module.exports上邊引入vue-loader插件:const VueLoaderPlugin = require('vue-loader/lib/plugin');

第二步:在module.exports最下邊添加:

plugins: [new VueLoaderPlugin()]


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

我覺得你可以這樣:

在 webpack.config.js 中加入

...
const?{?VueLoaderPlugin?}?=?require('vue-loader');

module.exports?=?{
????...
????plugins:?[
????????new?VueLoaderPlugin(),
????],
};

module.exports = {
? ?entry: path.join(__dirname, "src/main.js"),
? ?output: {
? ? ? ?filename: "bundle.js",
? ? ? ?path: path.join(__dirname, "diets"),
? ?},
? ?module: {
? ? ? ?rules: [
? ? ? ? ? ?{
? ? ? ? ? ? ? ?test: /.vue$/,
? ? ? ? ? ? ? ?loader: 'vue-loader'
? ? ? ? ? ?}
? ? ? ?]
? ?},
? ?plugins: [
? ? ? ?new VueLoaderPlugin(),
? ?],
};


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

Jason_derknight

后一個(gè)的 module.exports 可以不用看,不小心打上去的
2019-04-07 回復(fù) 有任何疑惑可以回復(fù)我~

https://vue-loader.vuejs.org/zh/guide/#%E6%89%8B%E5%8A%A8%E8%AE%BE%E7%BD%AE

新版本的vue-loader 要求必須手動(dòng)添加vueLoaderPlugin. 老師的那個(gè)配置是老版本的。

我建議去老師的這個(gè)項(xiàng)目的git,https://github.com/Jokcy/vue-todo-tech/blob/master/package.json

直接copy package.json 來install。 這樣就和老師一樣了

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

舉報(bào)

0/150
提交
取消

執(zhí)行npm run build報(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)