@tamagui/build 3.0.0-beta.1407.1 → 3.0.0-beta.1408.1

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 +8 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "3.0.0-beta.1407.1",
3
+ "version": "3.0.0-beta.1408.1",
4
4
  "license": "MIT",
5
5
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
6
6
  "files": [
package/tamagui-build.js CHANGED
@@ -355,8 +355,8 @@ function resolveOutputModuleSpecifier(
355
355
  const platformExtension = outputExtension.match(/^\.(native|web|ios|android)\./)?.[1]
356
356
  const explicitPlatformExtension = pathname.match(/\.(native|web|ios|android)$/)?.[1]
357
357
  let extension = outputExtension
358
- if (explicitPlatformExtension && outputExtension === '.mjs') {
359
- extension = '.js'
358
+ if (explicitPlatformExtension) {
359
+ extension = outputExtension.endsWith('.cjs') ? '.cjs' : '.js'
360
360
  } else if (platformExtension && pathname.endsWith(`.${platformExtension}`)) {
361
361
  extension = outputExtension.replace(`.${platformExtension}`, '')
362
362
  }
@@ -1731,7 +1731,12 @@ async function esbuildWriteIfChanged(
1731
1731
  const shouldPreserveJsAlias =
1732
1732
  preserveJsPathSet.has(path) || preserveJsPathAbsoluteSet.has(path)
1733
1733
 
1734
- if (!path.includes('.native.') && !shouldPreserveJsAlias) {
1734
+ if (
1735
+ !path.includes('.native.') &&
1736
+ !path.includes('.android.') &&
1737
+ !path.includes('.ios.') &&
1738
+ !shouldPreserveJsAlias
1739
+ ) {
1735
1740
  cleanupNonMjsFiles.push(path)
1736
1741
  cleanupNonMjsFiles.push(path + '.map')
1737
1742
  }