Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
873 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 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.4k users

...