課程
/前端開發(fā)
/前端工具
/Vue+Webpack打造todo應(yīng)用
這個是什么錯誤呢
2018-04-25
源自:Vue+Webpack打造todo應(yīng)用 2-1
正在回答
解決了,webpack.config.js文件修改如下(https://vue-loader.vuejs.org/guide/):
const path = require('path')
const { VueLoaderPlugin } = require('vue-loader')
module.exports = {
mode: 'development',
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
// this will apply to both plain .js files
// AND <script> blocks in vue files
test: /\.js$/,
loader: 'babel-loader'
// this will apply to both plain .css files
// AND <style> blocks in vue files
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
]
}
plugins: [
// make sure to include the plugin for the magic
new VueLoaderPlugin()
如果提示ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in 'C:\Users\hbs\own\project\vuetest',執(zhí)行下面命令:npm install babel-loader --save
慕前端0336099 提問者
qq_時光如梭_03147320
陳年老抽 回復(fù) qq_時光如梭_03147320
VueLoaderPlugin is not a constructor……
陳年老抽
hello阿月
出現(xiàn)同樣的問題,但不知道怎么解決。
慕神1239514
是缺少一些loader吧
圖片看不大清楚,不過應(yīng)該是app.vue的中test這個div ID的一些格式問題。
舉報(bào)
用前端最熱門框架Vue+最火打包工具Webpack打造todo應(yīng)用
2 回答大神請留步,幫我看個問題,謝謝啦
1 回答打包成功了 但是svg顯示好像有問題...有誰幫幫忙 謝謝
3 回答怎么有錯 按照老師的安裝步驟 忘解答 謝謝
1 回答請老師還有各位同學(xué)幫忙看看Module parse failed: Unexpected character '#'
4 回答npm run dev報(bào)錯,老師可以幫忙看下嗎
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2018-04-27
解決了,webpack.config.js文件修改如下(https://vue-loader.vuejs.org/guide/):
const path = require('path')
const { VueLoaderPlugin } = require('vue-loader')
module.exports = {
mode: 'development',
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader'
},
// this will apply to both plain .js files
// AND <script> blocks in vue files
{
test: /\.js$/,
loader: 'babel-loader'
},
// this will apply to both plain .css files
// AND <style> blocks in vue files
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
]
}
]
},
plugins: [
// make sure to include the plugin for the magic
new VueLoaderPlugin()
]
}
如果提示ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in 'C:\Users\hbs\own\project\vuetest',執(zhí)行下面命令:npm install babel-loader --save
2018-05-23
VueLoaderPlugin is not a constructor……
2018-04-27
出現(xiàn)同樣的問題,但不知道怎么解決。
2018-04-26
是缺少一些loader吧
2018-04-25
圖片看不大清楚,不過應(yīng)該是app.vue的中test這個div ID的一些格式問題。