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

build.cache:true does not work together with build.extractCSS:true in static mode #8061

Open
simplenotezy opened this issue Sep 11, 2020 · 7 comments

Comments

@simplenotezy
Copy link

simplenotezy commented Sep 11, 2020

Versions

  • nuxt: v2.14.0
  • node: v12.18.3

Steps to reproduce

  1. Set cache:true in build configuration
  2. Set extractCSS:true in build configuration
  3. Run yarn nuxt generate
  4. First time it will work and look as it should
  5. Run yarn nuxt generate again; it will work fine, still.
  6. Go back and update your nuxt.config.js file (e.g. add a new line), so full rebuild will be made
  7. Run yarn nuxt generate
  8. Visit your site. No stylesheets have been injected, and Times New Roman font everywhere.
  9. Set cache:false in build configuration
  10. Run yarn nuxt generate
  11. Visit your site - it works fine

What is Expected?

Stylesheets should be loaded when extractCSS:true even though cache:true is also set

What is actually happening?

It works the first time, but when you rebuild (e.g. made a change to nuxt.config.js) it generates your site without any stylesheets at all.

@stale
Copy link

stale bot commented Oct 12, 2020

Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

@stale stale bot added the stale label Oct 12, 2020
@Snack-X
Copy link

Snack-X commented Oct 20, 2020

This is same issue as #7446, along with #8048.

@stale stale bot removed the stale label Oct 20, 2020
@stale
Copy link

stale bot commented Nov 21, 2020

Thanks for your contribution to Nuxt.js!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you would like this issue to remain open:

  1. Verify that you can still reproduce the issue in the latest version of nuxt-edge
  2. Comment the steps to reproduce it

Issues that are labeled as pending will not be automatically marked as stale.

@stale stale bot added the stale label Nov 21, 2020
@VRuzhentsov
Copy link

Still can reproduce

@stale stale bot removed the stale label Nov 23, 2020
@clarkdo clarkdo self-assigned this Nov 26, 2020
@clarkdo
Copy link
Member

clarkdo commented Nov 29, 2020

Hi, this issue is from #5004, the reason is that extract-css-chunks-webpack-plugin doesn't work well with thread-loader because thread-loader will create separate context which can't accessed by extract-css-chunks-webpack-plugin.

The issue has been a while, I'll look into in again to see if thread-loader has changed anything.

@clarkdo
Copy link
Member

clarkdo commented Nov 29, 2020

I just checked, looks thread-loader is still not working with extract-css-chunks-webpack-plugin and there has been an issue opened there webpack-contrib/thread-loader#66, let's keep tracking that issue.

@Snack-X
Copy link

Snack-X commented Nov 30, 2020

Yes, parallel and extractCSS does not work together, and it has already been addressed with linked PR. But is it really related with cache option?

If so, combination of parallel and extractCSS options can be disabled, just like #5004.

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

5 participants