Skip to content

Commit

Permalink
Merge pull request #26145 from storybookjs/norbert/fix-addon-bundling
Browse files Browse the repository at this point in the history
Core: Fix addon bundling script
  • Loading branch information
ndelangen authored Feb 23, 2024
2 parents b1b530f + dd4b9c0 commit 21a2300
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/prepare/addon-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,12 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
...(optimized ? dtsConfig : {}),
entry: exportEntries,
format: ['cjs'],
target: 'node18',
platform: 'node',
external: commonExternals,
target: browserOptions.target,
platform: 'neutral',
external: [...commonExternals, ...globalManagerPackages, ...globalPreviewPackages],
esbuildOptions: (options) => {
/* eslint-disable no-param-reassign */
options.conditions = ['module'];
options.platform = 'node';
options.platform = 'neutral';
Object.assign(options, getESBuildOptions(optimized));
/* eslint-enable no-param-reassign */
},
Expand Down

0 comments on commit 21a2300

Please sign in to comment.