Skip to content

Commit

Permalink
Merge pull request #25239 from storybookjs/shilman/bundle-for-node18
Browse files Browse the repository at this point in the history
Core: Bundle for node18 in SB8
  • Loading branch information
ndelangen authored Dec 18, 2023
2 parents 152edae + 4d5f965 commit 1aa7b1a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions scripts/prepare/addon-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
...(optimized ? dtsConfig : {}),
entry: exportEntries,
format: ['cjs'],
target: 'node16',
target: 'node18',
platform: 'node',
external: commonExternals,
esbuildOptions: (options) => {
Expand Down Expand Up @@ -184,7 +184,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
...commonOptions,
entry: nodeEntries.map((e: string) => slash(join(cwd, e))),
format: ['cjs'],
target: 'node16',
target: 'node18',
platform: 'node',
external: commonExternals,
esbuildOptions: (c) => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
outDir,
sourcemap: false,
format: ['cjs'],
target: 'node16',
target: 'node18',
...(dtsBuild === 'cjs' ? dtsConfig : {}),
platform: 'node',
clean: false,
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare/esm-bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
outExtension: () => ({
js: '.js',
}),
target: 'node16',
target: 'node18',
clean: false,
...(dtsBuild ? dtsConfig : {}),
platform: 'node',
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare/facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => {
entry: entries.map((e: string) => slash(join(cwd, e))),
outDir: join(process.cwd(), 'dist'),
format: ['cjs'],
target: 'node16',
target: 'node18',
platform: 'node',
external: [name, ...Object.keys(dependencies || {}), ...Object.keys(peerDependencies || {})],

Expand Down

0 comments on commit 1aa7b1a

Please sign in to comment.