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

Question: How to handle global styles generated? #97

Open
telmaantunes opened this issue Apr 21, 2022 · 1 comment
Open

Question: How to handle global styles generated? #97

telmaantunes opened this issue Apr 21, 2022 · 1 comment

Comments

@telmaantunes
Copy link

After building a vue 2 application we usually have a folder like this:

Screenshot 2022-04-21 at 18 33 27

This index.html file is not going to be imported from single-spa, so I've removed the HtmlWebpackPlugin as recommend, which skips the index.html.

Screenshot 2022-04-21 at 18 29 52

However, this index.html file imported the global styles generated from vue.

<script defer="defer" src="/main.82db85a9.js" nomodule>

After removing it, my spa only requires the css files from the views, not the "main.hash.js" file (which contains the styles from global components and such).

How can I fix this? While still using hashed files?

Thanks for the help!!

@telmaantunes
Copy link
Author

Until now, the only solution I can think of is disabling the css extraction on vue.config.js, which includes the css directly on the main.js file, but I wanted separate files.

css: {
    sourceMap: process.env.NODE_ENV !== 'production',
    extract: false
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant