From 321de92db542a82042c3492b96b3a166d2ea0726 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Tue, 7 Jan 2025 15:17:15 +0100 Subject: [PATCH] undo shim change in prepare script --- scripts/prepare/bundle.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/prepare/bundle.ts b/scripts/prepare/bundle.ts index bff8ad6e1f52..e716a565459e 100755 --- a/scripts/prepare/bundle.ts +++ b/scripts/prepare/bundle.ts @@ -9,13 +9,12 @@ import * as fs from 'fs-extra'; // eslint-disable-next-line depend/ban-dependencies import { glob } from 'glob'; import slash from 'slash'; -import { dedent } from 'ts-dedent'; import type { Options } from 'tsup'; import { build } from 'tsup'; import type { PackageJson } from 'type-fest'; import { exec } from '../utils/exec'; -import { esbuild, nodeInternals } from './tools'; +import { dedent, esbuild, nodeInternals } from './tools'; /* TYPES */ @@ -108,7 +107,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { silent: true, treeshake: true, entry: nonPresetEntries, - shims: true, + shims: false, watch, outDir: OUT_DIR, sourcemap: false, @@ -137,7 +136,7 @@ const run = async ({ cwd, flags }: { cwd: string; flags: string[] }) => { esbuildOptions: (c) => { c.conditions = ['module']; - c.platform = platform === 'node' ? 'node' : 'browser'; + c.platform = platform || 'browser'; Object.assign(c, getESBuildOptions(optimized)); }, })