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

Adding and then removing manualChunks causes runtime error #569

Open
echjordan0 opened this issue Feb 14, 2024 · 0 comments
Open

Adding and then removing manualChunks causes runtime error #569

echjordan0 opened this issue Feb 14, 2024 · 0 comments

Comments

@echjordan0
Copy link

Versions

  • vite-plugin-federation: v1.1.8
  • vite: 2.9.16

Reproduction

Additional Details

Steps to reproduce

  1. Add a manual chunk in the remote's Vite config (it does not seem library specific but I was chunking a PDF library) and build
      rollupOptions: {
        output: {
          manualChunks: {
            'vue-pdf-embed/dist/vue2-pdf-embed': ['vue-pdf-embed/dist/vue2-pdf-embed'],
          },
        },
      },
  1. Later remove this piece of the config bc you no longer want to create a separate chunk
    Screenshot 2024-02-13 at 5 42 14 PM
  2. Build for production
  3. Try to fetch the remote receive the following error:
Screenshot 2024-02-13 at 5 44 56 PM

Interestingly, I can work around this error by changing the config to

     rollupOptions: {
        output: {
          manualChunks: {},
        },
      },

But it seems very strange that I'd need to do so. Perhaps it's not properly cleaning up the options when they're removed entirely?

Thank you!

What is Expected?

What is actually happening?

@echjordan0 echjordan0 changed the title Adding and then removing manualChunks causes error Adding and then removing manualChunks causes runtime error Feb 14, 2024
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