Skip to content

Conversation

@dafuga
Copy link
Contributor

@dafuga dafuga commented Sep 16, 2024

No description provided.

output: {
banner,
file: pkg.main,
dir: pkg.main,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was getting a [!] RollupError: Invalid value for option "output.file" - when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option. error at build time without this change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're changing this, we either need to:

  1. Change the package.json so its not specifying filenames, and is instead specifying folder names. Right now its generating folders with filenames, you can see them in ./lib.
  2. Switch instead to using inlineDynamicImports instead, which will output a file and we can revert these changes. This will bundle it all into one file.

Unsure of which is better TBH. Worth some research?

Copy link
Contributor Author

@dafuga dafuga Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just looked into it and my understanding is that using inlineDynamicImports will just bundle everything the way it was bundled before this PR so it's probably fine 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the rollup configs to use inlineDynamicImports instead 👍

@dafuga dafuga changed the title Making the plugin useable in SSR Making the plugin usable in SSR Sep 16, 2024
@dafuga dafuga force-pushed the making-useable-in-ssr branch from 25d02ec to 2351939 Compare September 16, 2024 22:13
@dafuga dafuga force-pushed the making-useable-in-ssr branch from 2351939 to b7a7dc9 Compare September 16, 2024 23:33
@dafuga dafuga merged commit 172c38e into master Sep 17, 2024
@dafuga dafuga deleted the making-useable-in-ssr branch September 17, 2024 00:28
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

Successfully merging this pull request may close these issues.

3 participants