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

Cache is corrupted when run module with 'nuxt-build-optimisations' module #103

Closed
sondh0127 opened this issue Jun 25, 2021 · 4 comments
Closed

Comments

@sondh0127
Copy link

Describe the bug
Cache is corrupted when run module with 'nuxt-build-optimisations'. This force build-optimisation re-create the cache.

To Reproduce
Steps to reproduce the behavior:

  1. Clone repository '...'
    https://github.com/sondh0127/nuxt-windi-optimize
  2. Run yarn dev
  3. Close dev server (Ctrl+C)
  4. Run yarn dev
  5. See error

Expected behavior
Windi module will work well with module (nuxt-build-optimisations)

Screenshots
If applicable, add screenshots to help explain your problem.
image

Additional context

@harlan-zw
Copy link
Member

Hey @sondh0127

Thanks for the issue and reproduction repo. I followed your instructions and could replicate the bug.

I'm not too familiar with how the hardsource plugin works internally, but I'm guessing it's failing because the pitcher is removed as part of the compilation. Will need to do a proper investigation.

It seems that these "ERROR"s are fine to ignore though. If you want to avoid it you'll need to disable the hardsource plugin either by changing your profile to experimental or you can disable hardsource using the feature flag

buildOptimisations: {
  features: {
    hardSourcePlugin: false
  }
}

@sondh0127
Copy link
Author

Thank you @harlan-zw for the quick response. With hardsource disabled, the error is gone.

But I also hope the module will work with hardsource plugin. It seems fast to me. Hardsource enabled startime reduced 29 seconds to 10 seconds.

P/S: I will also try 'nuxt-vite' again, but it caused a lot of problems last time.

@harlan-zw
Copy link
Member

Yup will try find a fix for it

@harlan-zw
Copy link
Member

Hey @sondh0127. Have found the issue with this and have pushed a release - 1.2.1 which solves it.

Let me know if you have any further issues :)

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

2 participants