Vue项目运行时提示svg-sprite-loader ExtractPluginMissingException?
我已经执行了:
vue add svg-sprite
npm install svgo svgo-loader --save-dev
npm install svg-sprite-loader
运行时终端打印warning:
Module build failed (from ./node_modules/svg-sprite-loader/lib/loader.js):
ExtractPluginMissingException: svg-sprite-loader exception. svg-sprite-loader in extract mode requires the corresponding plugin
at Object.loader (D:mastervue-element-studynode_modulessvg-sprite-loaderlibloader.js:47:13)
@ ./src/assets/icons sync ^./.*.svg$
@ ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/SvgIcon/SvgIcon.vue?vue&type=script&lang=js&
@ ./src/components/SvgIcon/SvgIcon.vue?vue&type=script&lang=js&
@ ./src/components/SvgIcon/SvgIcon.vue
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.1.10:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js
浏览器控制台报错:
求教
回答
可能是你webpack配置中没有配置 svg-sprite-loader
以上是 Vue项目运行时提示svg-sprite-loader ExtractPluginMissingException? 的全部内容, 来源链接: utcz.com/a/63865.html