@tamagui/build 1.0.1-beta.151 → 1.0.1-beta.154

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 +10 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.0.1-beta.151",
3
+ "version": "1.0.1-beta.154",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
package/tamagui-build.js CHANGED
@@ -13,6 +13,7 @@ const jsOnly = !!process.env.JS_ONLY
13
13
  const skipJS = !!(process.env.SKIP_JS || false)
14
14
  const shouldSkipTypes = !!(process.argv.includes('--skip-types') || process.env.SKIP_TYPES)
15
15
  const shouldBundle = !!process.argv.includes('--bundle')
16
+ const shouldBundleNodeModules = !!process.argv.includes('--bundle-modules')
16
17
  const shouldClean = !!process.argv.includes('clean')
17
18
  const shouldCleanBuildOnly = !!process.argv.includes('clean:build')
18
19
  const shouldWatch = process.argv.includes('--watch')
@@ -22,6 +23,7 @@ let shouldSkipInitialTypes = !!process.env.SKIP_TYPES_INITIAL
22
23
  const pkgMain = pkg.main
23
24
  const pkgModule = pkg.module
24
25
  const pkgModuleJSX = pkg['module:jsx']
26
+ const pkgTypes = Boolean(pkg['types'] || pkg['typings'])
25
27
 
26
28
  const flatOut = [pkgMain, pkgModule, pkgModuleJSX].filter(Boolean).length === 1
27
29
 
@@ -107,6 +109,7 @@ async function build() {
107
109
  // process.once('SIGTERM', cleanup)
108
110
 
109
111
  async function buildTsc() {
112
+ if (!pkgTypes) return
110
113
  if (jsOnly || shouldSkipTypes) return
111
114
  if (shouldSkipInitialTypes) {
112
115
  shouldSkipInitialTypes = false
@@ -164,8 +167,10 @@ async function buildJs() {
164
167
  keepNames: false,
165
168
  format: 'cjs',
166
169
  color: true,
170
+ allowOverwrite: true,
171
+ jsx: 'automatic',
167
172
  logLevel: 'error',
168
- plugins: [externalPlugin],
173
+ plugins: shouldBundleNodeModules ? [] : [externalPlugin],
169
174
  minify: false,
170
175
  platform: 'node',
171
176
  })
@@ -178,6 +183,9 @@ async function buildJs() {
178
183
  sourcemap: true,
179
184
  target: 'node16',
180
185
  keepNames: false,
186
+ jsx: 'automatic',
187
+ allowOverwrite: true,
188
+ jsxFactory: '_jsx',
181
189
  format: 'esm',
182
190
  color: true,
183
191
  logLevel: 'error',
@@ -193,6 +201,7 @@ async function buildJs() {
193
201
  entryPoints: files,
194
202
  bundle: shouldBundle,
195
203
  sourcemap: true,
204
+ allowOverwrite: true,
196
205
  target: 'es2020',
197
206
  keepNames: false,
198
207
  format: 'esm',