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/vue package to ensure that the @storyblok/js library is not bundled within the distribution build. The intention is to treat @storyblok/js as an external dependency, which should be loaded separately rather than being included in the final build output.
Suggested solution or improvement
Original Configuration:
The original Vite configuration for @storyblok/vue included only Vue as an external dependency, and did not consider @storyblok/js. Here’s the pertinent part of the original setup:
// Original Rollup Options
rollupOptions: {output: {globals: {vue: "Vue",},},external: ["vue"],}
Modified Configuration:
In the new configuration, I added @storyblok/js 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 will be referenced as an external resource in projects utilizing @storyblok/vue, thereby reducing the bundle size and separating concerns.
Description
I am looking to modify the Vite configuration for the
@storyblok/vue
package to ensure that the@storyblok/js
library is not bundled within the distribution build. The intention is to treat@storyblok/js
as an external dependency, which should be loaded separately rather than being included in the final build output.Suggested solution or improvement
Original Configuration:
The original Vite configuration for
@storyblok/vue
included only Vue as an external dependency, and did not consider@storyblok/js
. Here’s the pertinent part of the original setup:Modified Configuration:
In the new configuration, I added
@storyblok/js
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
will be referenced as an external resource in projects utilizing@storyblok/vue
, thereby reducing the bundle size and separating concerns.Validations
The text was updated successfully, but these errors were encountered: