Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css:sourceMap:true + stylus-loader = multiple Vue instantiations #59

Open
phil294 opened this issue Jan 3, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@phil294
Copy link

phil294 commented Jan 3, 2021

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

  1. In vue.config.js,
    css: {
        sourceMap: true,
    },
    
  2. Delete postcss.config.js (because it seems to overwrite the sourcemap setting or something like that)
  3. Install stylus and stylus-loader (v3.x for compatibility issues)
  4. Add some non-empty stylus style tags into some view or component
  5. 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
@yabab-dev
Copy link
Contributor

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 :)

@yabab-dev yabab-dev added the bug Something isn't working label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants