vue-cli-service compiling time increase drastically when svg-spritemap-webpack-plugin is added
See original GitHub issueI am using webpack@4.28.4 on a VueJS 2.6.10 project, and “svg-spritemap-webpack-plugin”: “3.3.7” My vue.config.js looks like :
const SVGSpritemapPlugin = require("svg-spritemap-webpack-plugin");
module.exports = {
devServer: {
port: "8082"
},
configureWebpack: {
plugins: [
new SVGSpritemapPlugin()
]
}
};
The compiling time was ~150ms before installing the plugin, after installation it went to ~8000ms. I’ve commented the line new SVGSpritemapPlugin()
and the compiling time went back to normal (around 150ms)
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
vue-cli-service build crash · Issue #7180 - GitHub
Count me in, I picked a bad time to try and prune our peer dependencies - was sure it was something I'd done....
Read more >Unable to run "vue-cli-service serve" [vue 3] - Stack Overflow
A couple issues: Your project depends on vue-cli-service 4.x (which only uses Webpack 4) and on webpack 5. For Webpack 5, vue-cli-service ......
Read more >CLI Service - Vue CLI
Inside a Vue CLI project, @vue/cli-service installs a binary named vue-cli-service . You can access the binary directly as vue-cli-service in ...
Read more >Speed Up Your Vue.js Single-Page App - Sommer IT Consulting
With Vue.js you are able to quickly build a Single Page application. ... component can drastically increase your rendering performance.
Read more >How to Migrate from Vue CLI to Vite - Vue School Blog
Learn how to migrate from Vue CLI to Vite in 9 simple steps for a faster and more streamlined developer experience.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I investigated the spritemap I found two
symbol
tags. I rendred the svg and “surprisingly” I found two diagrams I have never seen before and I have no idea where it come from. (5min later)… I found the two SVGs in two dependencies in my node_modules. To tell the plugin to look for SVGs only inside the svgs folder I changed my vue.config.js to look like this :My folder s tree is like this :
And the problem is SOLVED
That’s probably because it’s matching more SVGs but I can’t know for sure without a configuration object. You could open the spritemap SVG in an editor and check some id’s of the
symbol
s, that might help finding the SVGs.The best way is to pass a specific glob as the first argument instead of using the default that just matches all SVGs recursively.