@tamagui/build 1.89.0 → 1.89.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/tamagui-build.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.89.0",
3
+ "version": "1.89.2",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
package/tamagui-build.js CHANGED
@@ -475,7 +475,7 @@ async function esbuildWriteIfChanged(
475
475
  }
476
476
 
477
477
  const built = await esbuild.build(buildSettings)
478
- const isESM = buildSettings.target === 'esm'
478
+ const isESM = buildSettings.target === 'esm' || buildSettings.target === 'esnext'
479
479
 
480
480
  if (!built.outputFiles) {
481
481
  return
@@ -536,7 +536,8 @@ async function esbuildWriteIfChanged(
536
536
  }
537
537
 
538
538
  if (pkgRemoveSideEffects && isESM) {
539
- outString = outString.replace(/\nimport "[^"]+";\n/g, '\n')
539
+ // match whitespace to preserve sourcemaps
540
+ outString = outString.replace(/\nimport "[^"]+";\n/g, '\n\n')
540
541
  }
541
542
 
542
543
  async function flush(contents, path) {