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

Vite: SCSS Styles doesn't preload in dev #11990

Closed
proskurindima opened this issue Oct 13, 2021 · 7 comments
Closed

Vite: SCSS Styles doesn't preload in dev #11990

proskurindima opened this issue Oct 13, 2021 · 7 comments
Assignees

Comments

@proskurindima
Copy link

Describe the bug and expected behavior

When I use SCSS, styles doesn't preload.
You can see it in codeSanbox

The same problem appears in my local environment.

Steps to reproduce

Steps to reproduce the behavior:

  1. Add node-sass, sass and sass-loader packages in your package.json
  2. Add some styles in <style> tag with attr lang="scss". For example:
<style lang="scss">
.test {
  font-size: 24px;
  font-family: sans-serif;
}
</style>
  1. Reload page
  2. See, that styles doesn't preload

Additional context

I've reproduced this error in codeSanbox.

@antfu
Copy link
Member

antfu commented Oct 13, 2021

The same problem mentioned in nuxt/vite#220

@proskurindima
Copy link
Author

@antfu
This error also occurs when I use the Webpack
And in production mode too(

@qmzik
Copy link

qmzik commented Oct 13, 2021

I tested it in production mode with Vite, it works fine, it occurs only in dev mode

@antfu antfu added the vite label Oct 13, 2021
@antfu antfu changed the title SCSS Styles doesn't preload. Vite: SCSS Styles doesn't preload in dev Oct 13, 2021
@antfu
Copy link
Member

antfu commented Oct 13, 2021

@antfu This error also occurs when I use the Webpack And in production mode too(

For Webpack, please open another issue with details for us to track, thanks.

@antfu
Copy link
Member

antfu commented Oct 13, 2021

I tested it in production mode with Vite, it works fine, it occurs only in dev mode

Yes this only happens on dev ssr, fix is here nuxt/framework#916

@proskurindima
Copy link
Author

@antfu This error also occurs when I use the Webpack And in production mode too(

For Webpack, please open another issue with details for us to track, thanks.

I've opened another issue. This is the same problem with identical config, except disabled vite in nuxt.config file

@antfu
Copy link
Member

antfu commented Oct 22, 2021

Fixed in nuxt/framework#1101

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

Successfully merging a pull request may close this issue.

4 participants