Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
960 views
in Technique[技术] by (71.8m points)

Vue项目运行时提示svg-sprite-loader ExtractPluginMissingException?

我已经执行了:

vue add svg-sprite
npm install svgo svgo-loader --save-dev
npm install svg-sprite-loader

运行时终端打印warning:
image.png
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

浏览器控制台报错:
image.png

求教


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

可能是你webpack配置中没有配置 svg-sprite-loader


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...