@tamagui/build 3.0.0-beta.765.1 → 3.0.0-beta.806.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.
- package/package.json +3 -3
- package/tamagui-build.js +14 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/build",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.806.1",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"files": [
|
|
6
6
|
"babel-plugin-process-env-to-meta.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"get-tsconfig": "^4.14.0",
|
|
43
43
|
"lodash.debounce": "^4.0.8",
|
|
44
44
|
"oxc-transform": "^0.112.0",
|
|
45
|
-
"picomatch": "4.0.
|
|
45
|
+
"picomatch": "4.0.4",
|
|
46
46
|
"rolldown": "1.2.4"
|
|
47
47
|
},
|
|
48
48
|
"optionalDependencies": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
|
-
"vitest": "4.0
|
|
66
|
+
"vitest": "4.1.0"
|
|
67
67
|
},
|
|
68
68
|
"repository": {
|
|
69
69
|
"type": "git",
|
package/tamagui-build.js
CHANGED
|
@@ -483,6 +483,11 @@ const shouldSkipTypes = shouldSwapExports
|
|
|
483
483
|
: !!(hasFlag('--skip-types') || process.env.SKIP_TYPES)
|
|
484
484
|
|
|
485
485
|
const shouldSkipNative = hasFlag('--skip-native')
|
|
486
|
+
// a package that hosts both platforms at runtime (the compiler evaluates
|
|
487
|
+
// modules per-platform and saves/restores process.env.TAMAGUI_TARGET) must
|
|
488
|
+
// keep its env reads live: inlining them turns its save/restore into an
|
|
489
|
+
// unconditional env flip
|
|
490
|
+
const shouldSkipTargetDCE = hasFlag('--keep-env-target')
|
|
486
491
|
const shouldSkipMJS = hasFlag('--skip-mjs')
|
|
487
492
|
const shouldSkipSourceMaps =
|
|
488
493
|
hasFlag('--skip-sourcemaps') || getEnvFlag('TAMAGUI_BUILD_SKIP_SOURCEMAPS')
|
|
@@ -1513,12 +1518,15 @@ async function esbuildWriteIfChanged(
|
|
|
1513
1518
|
}
|
|
1514
1519
|
|
|
1515
1520
|
if (!isMap && path.endsWith('.js')) {
|
|
1516
|
-
const hadTamaguiTarget =
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1521
|
+
const hadTamaguiTarget =
|
|
1522
|
+
!shouldSkipTargetDCE && contents.includes('process.env.TAMAGUI_TARGET')
|
|
1523
|
+
if (!shouldSkipTargetDCE) {
|
|
1524
|
+
contents = dceTamaguiTarget(contents, {
|
|
1525
|
+
format: opts.format,
|
|
1526
|
+
jsx: opts.jsx,
|
|
1527
|
+
platform,
|
|
1528
|
+
})
|
|
1529
|
+
}
|
|
1522
1530
|
|
|
1523
1531
|
if (isESM && hadTamaguiTarget) {
|
|
1524
1532
|
contents = await pruneUnusedImports(contents, path)
|