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

Webpack: SCSS Styles doesn't preload in dev #11986

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

Webpack: SCSS Styles doesn't preload in dev #11986

proskurindima opened this issue Oct 13, 2021 · 3 comments

Comments

@proskurindima
Copy link

proskurindima commented Oct 13, 2021

Environment

Local:

  • Operating System: Linux
  • Node Version: v14.17.1
  • Nuxt Version: 3-3.0.0-27234503.d5127e9
  • Package Manager: Yarn
  • Bundler: Webpack
  • User Config: modules, styleResources, css
  • Runtime Modules: @nuxtjs/style-resources@1.2.1
  • Build Modules: -

Also reproduces in CodeSandbox

Describe the bug

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

Reproduction

  1. Add node-sass, sass and sass-loader packages in your package.json
  2. Disable Vite in nuxt.config file. vite=false
  3. 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. They've applied after small delay

Additional context

I've reproduced this error in codeSanbox.

Also, this problem happens with Vite. There is one more ticket

Logs

No response

@hputzek
Copy link

hputzek commented Oct 22, 2021

I can confirm:

SCSS Styles doesn't preload in dev

same for me


  • Operating System: Darwin
  • Node Version: v14.16.1
  • Nuxt Version: 3.0.0-27244105.2256b2b
  • Package Manager: npm
  • Bundler: Vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

@danielroe
Copy link
Member

At the moment inlining styles is not supported for webpack + vue-loader: vuejs/vue-style-loader#56.

@danielroe
Copy link
Member

This is no longer reproducible for me. Let me know if not and I'll happily reopen.

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants