課程
/前端開發
/前端工具
/Vue+Webpack打造todo應用
第一節沒跑通,后面進行不下去了。。求第一節源碼
2018-08-22
源自:Vue+Webpack打造todo應用 2-1
正在回答
剛剛學完整個課程,解決了版本依賴的坑
源碼:https://github.com/MrJane/imooc/tree/master/vue-webpack-todo
我找到了答案,分享給大家。
只要修改webpack.config.js就可以打包了。
const path = require('path');? ?
const {VueLoaderPlugin}=require('vue-loader');??
????module.exports = {
????????entry: path.resolve(__dirname, "src/index.js"),? ?//webpack4官方絕對路徑
????devServer: {
????????contentBase: './dist'
????},
????output: {
????filename: 'bundle.js',
????????path: path.resolve(__dirname, 'dist')
????module: {
????rules: [
????????{
test: /\.vue$/,
use: [
'vue-loader'????????
]
},
{
test: /\.css$/,
'vue-style-loader',????????????????//可以不要
'style-loader',????????????????????????
'css-loader'
plugins:[
new VueLoaderPlugin()
};
我的第一節也沒跑通
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')
plugins: [
? ? ? ? // make sure to include the plugin for the magic
? ? ? ? new VueLoaderPlugin()
? ? ],
module:{
rules:[
test:/\.vue$/,
loader:'vue-loader'
? ? ? ? use: ['style-loader','css-loader']
}
這么配置,并且安裝?style-loader??webpack-cli 后可以編譯通過了。。。
qq_春秋_5
小潴 回復 qq_春秋_5
請問這個課程的源碼去哪里下載,為什么沒看到
舉報
用前端最熱門框架Vue+最火打包工具Webpack打造todo應用
4 回答這節課沒有源碼資料嗎?
3 回答學了第二節課:npm run build 時報錯
1 回答第2-3節 npm run dev報錯
1 回答第一次運行build時報錯
2 回答第一個視頻我就出錯了。
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
2018-10-06
剛剛學完整個課程,解決了版本依賴的坑
源碼:https://github.com/MrJane/imooc/tree/master/vue-webpack-todo
2018-09-14
我找到了答案,分享給大家。
只要修改webpack.config.js就可以打包了。
const path = require('path');? ?
const {VueLoaderPlugin}=require('vue-loader');??
????module.exports = {
????????entry: path.resolve(__dirname, "src/index.js"),? ?//webpack4官方絕對路徑
????devServer: {
????????contentBase: './dist'
????},
????output: {
????filename: 'bundle.js',
????????path: path.resolve(__dirname, 'dist')
????},
????module: {
????rules: [
????????{
test: /\.vue$/,
use: [
'vue-loader'????????
]
},
{
test: /\.css$/,
use: [
'vue-style-loader',????????????????//可以不要
'style-loader',????????????????????????
'css-loader'
]
},
]
},
plugins:[
new VueLoaderPlugin()
]
};
2018-08-28
我的第一節也沒跑通
2018-08-22
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')
},
plugins: [
? ? ? ? // make sure to include the plugin for the magic
? ? ? ? new VueLoaderPlugin()
? ? ],
module:{
rules:[
{
test:/\.vue$/,
loader:'vue-loader'
},
{
test: /\.css$/,
? ? ? ? use: ['style-loader','css-loader']
}
]
}
}
這么配置,并且安裝?style-loader??webpack-cli 后可以編譯通過了。。。
2018-08-22
請問這個課程的源碼去哪里下載,為什么沒看到