You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am looking to modify the Vite configuration for the @storyblok/js package to ensure that the storyblok-js-client library is not bundled within the distribution build. The intention is to treat storyblok-js-client as an external dependency, which should be loaded separately rather than being included in the final build output.
Suggested solution or improvement
I added storyblok-js-client as an external module and defined a global variable for it to ensure it is not bundled with the distribution. The updated configuration is as follows:
With the new configuration, the expectation is that storyblok-js-client will be referenced as an external resource in projects utilizing @storyblok/js, thereby reducing the bundle size and separating concerns.
Hi @juusopiikkila thanks for the suggestion, it's done by design because the Tree-shaking will only include the resources you need. Feel free to re-open if needed.
Description
I am looking to modify the Vite configuration for the
@storyblok/js
package to ensure that thestoryblok-js-client
library is not bundled within the distribution build. The intention is to treatstoryblok-js-client
as an external dependency, which should be loaded separately rather than being included in the final build output.Suggested solution or improvement
I added
storyblok-js-client
as an external module and defined a global variable for it to ensure it is not bundled with the distribution. The updated configuration is as follows:Additional context
With the new configuration, the expectation is that
storyblok-js-client
will be referenced as an external resource in projects utilizing@storyblok/js
, thereby reducing the bundle size and separating concerns.Validations
The text was updated successfully, but these errors were encountered: