css:sourceMap:true + stylus-loader = multiple Vue instantiations
Describe the bug
The vue instantiation in main.js happens multiple times, once for every stylus stylesheet, if css source maps are activated. I dont know what possible further problems this may cause, but something is probably not right here.
To Reproduce
- In
vue.config.js,css: { sourceMap: true, }, - Delete
postcss.config.js(because it seems to overwrite the sourcemap setting or something like that) - Install stylus and stylus-loader (v3.x for compatibility issues)
- Add some non-empty stylus style tags into some view or component
- On every page refresh, the vue instance will be created
1 + [number of files with some stylus stylesheets in it]times
Or just see the commit from the repro repo where I demonstrated this:
Reproduction repo/demo link run and check server console for the console.log from main.js
Expected behavior Only one vue instance creation per page refresh
Additional context
Please indicate versions of:
node: 12.20
vue-cli:
uvue: 0.1.7
os: manjaro linux
browser: chromium latest
Thanks again for this nice report!
You're right, when you have your browser devtools opened, this one will try to get source maps files and trigger a server-side rendering request...
I'll try to fix this, but this issue will only impact developers and not your actual users :)