課程
/前端開發(fā)
/前端工具
/Vue+Webpack打造todo應(yīng)用
為什么出錯(cuò)了
2018-04-26
源自:Vue+Webpack打造todo應(yīng)用 2-1
正在回答
出現(xiàn)了同樣的錯(cuò)誤,根據(jù)https://vue-loader.vuejs.org/guide/提示,修改為如下內(nèi)容即可。
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()
可能還會(huì)有錯(cuò)誤,例如“ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in 'C:\Users\hbs\own\project\vuetest'”之類的,安裝相應(yīng)包即可。
慕先生6553767 提問者
666老鐵給力,剛剛接觸,還是多謝大家?guī)椭?/p>
OK了 ,非常感謝
求代碼貼圖 。同樣的問題
舉報(bào)
用前端最熱門框架Vue+最火打包工具Webpack打造todo應(yīng)用
3 回答npm run build 出錯(cuò)
1 回答npm run build 出錯(cuò)
4 回答運(yùn)行·npm run build 出錯(cuò)·
5 回答npm run build 錯(cuò)誤
3 回答npm run build 報(bào)錯(cuò)
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2018-04-27
出現(xiàn)了同樣的錯(cuò)誤,根據(jù)https://vue-loader.vuejs.org/guide/提示,修改為如下內(nèi)容即可。
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()
]
}
可能還會(huì)有錯(cuò)誤,例如“ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in 'C:\Users\hbs\own\project\vuetest'”之類的,安裝相應(yīng)包即可。
2018-05-27
666老鐵給力,剛剛接觸,還是多謝大家?guī)椭?/p>
2018-05-07
OK了 ,非常感謝
2018-05-07
求代碼貼圖 。同樣的問題