-
看起來比較蛋疼 ,笑噴。。
查看全部 -
報錯信息
Module Error (from ./node_modules/vue-loader/lib/index.js):
vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config.
原因參考
https://vue-loader.vuejs.org/migrating.html#a-plugin-is-now-required
解決辦法
// webpack.config.js
const VueLoaderPlugin = require('vue-loader/lib/plugin')
module.exports = {
? // ...
? plugins: [
? ? new VueLoaderPlugin()
? ]
}
查看全部 -
webpack-dev-server
1、cross-env 兼容不同的平臺,設置環境變量
"build":"cross-env NODE_ENV=production webpack --config webpack.config.js"
2、組件更新,頁面只重新渲染組件的
config.devServer = {
????port:"8000",
????...
????hot:true
}
// 添加新插件
config.plugins.push(
????new webpack.HotModuleReplacementPlugin(),
????new webpack.NoEmitOnErrorsPlugin()
)
查看全部 -
es6是啥查看全部
-
分類打包工具
查看全部 -
分割打包文件
查看全部 -
單獨打包css
查看全部 -
加載scss文件
1、配置
{
? ? ? ? test:/\.scss$/,
? ? ? ? use:['style-loader','css-loader','sass-loader']
? ? ? },
2、npm i sass-loader node-sass
查看全部 -
使用vue-loader15
根據vue-loader官方提供的15版本的聲明方法,定義plugin。const?VueLoaderPlugin?=?require('vue-loader/lib/plugin')??module.exports?=?{ ??module:?{ ????rules:?[ ??????//?...?other?rules ??????{ ????????test:?/\.vue$/, ????????loader:?'vue-loader' ??????} ????] ??}, ??plugins:?[ ????new?VueLoaderPlugin()???//15版本需指定plugin ??]}
查看全部 -
Ddfff查看全部
-
2-2(7)根據打包過程的錯誤提示,安裝style-loader和stylus,安裝命令: npm install stylus-loader stylus查看全部
舉報