@tamagui/build 1.115.0 → 1.115.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui-build-test-simple-tpackage",
3
- "version": "1.115.0",
3
+ "version": "1.115.2",
4
4
  "main": "dist/cjs",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "types": "dist/types/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "build:target-native": "TAMAGUI_TARGET=native node ../../../tamagui-build.js"
17
17
  },
18
18
  "devDependencies": {
19
- "@tamagui/build": "1.115.0",
19
+ "@tamagui/build": "1.115.2",
20
20
  "typescript": "^5.5.2"
21
21
  }
22
22
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamagui-build-test-watch-package",
3
- "version": "1.115.0",
3
+ "version": "1.115.2",
4
4
  "main": "dist/cjs",
5
5
  "module": "dist/esm/index.mjs",
6
6
  "types": "dist/types/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "build:target-native": "TAMAGUI_TARGET=native node ../../../tamagui-build.js"
17
17
  },
18
18
  "devDependencies": {
19
- "@tamagui/build": "1.115.0",
19
+ "@tamagui/build": "1.115.2",
20
20
  "typescript": "^5.5.2"
21
21
  }
22
22
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.115.0",
3
+ "version": "1.115.2",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js",
6
6
  "teesx": "./teesx.sh"
@@ -14,7 +14,7 @@
14
14
  "dependencies": {
15
15
  "@babel/core": "^7.25.2",
16
16
  "@swc/core": "^1.7.21",
17
- "@tamagui/babel-plugin-fully-specified": "1.115.0",
17
+ "@tamagui/babel-plugin-fully-specified": "1.115.2",
18
18
  "@types/fs-extra": "^9.0.13",
19
19
  "babel-plugin-fully-specified": "*",
20
20
  "chokidar": "^3.5.2",
package/tamagui-build.js CHANGED
@@ -54,6 +54,8 @@ const pkgRemoveSideEffects = pkg.removeSideEffects || false
54
54
 
55
55
  const flatOut = [pkgMain, pkgModule, pkgModuleJSX].filter(Boolean).length === 1
56
56
 
57
+ const avoidCJS = pkgMain?.endsWith('.js')
58
+
57
59
  const replaceRNWeb = {
58
60
  esm: {
59
61
  from: 'from "react-native"',
@@ -392,10 +394,12 @@ async function buildJs() {
392
394
  platform: 'node',
393
395
  }
394
396
 
395
- const cjsConfigWeb = {
396
- ...cjsConfig,
397
- outExtension: { '.js': '.cjs' },
398
- }
397
+ const cjsConfigWeb = avoidCJS
398
+ ? cjsConfig
399
+ : {
400
+ ...cjsConfig,
401
+ outExtension: { '.js': '.cjs' },
402
+ }
399
403
 
400
404
  const esmConfig = {
401
405
  target: 'esnext',
@@ -426,7 +430,7 @@ async function buildJs() {
426
430
  ? esbuildWriteIfChanged(cjsConfigWeb, {
427
431
  platform: 'web',
428
432
  bundle: shouldBundleFlag,
429
- specifyCJS: true,
433
+ specifyCJS: !avoidCJS,
430
434
  })
431
435
  : null,
432
436