@tamagui/build 1.26.0 → 1.27.0

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 +20 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.26.0",
3
+ "version": "1.27.0",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
package/tamagui-build.js CHANGED
@@ -16,6 +16,7 @@ const shouldSkipTypes = !!(
16
16
  process.argv.includes('--skip-types') || process.env.SKIP_TYPES
17
17
  )
18
18
  const shouldBundle = !!process.argv.includes('--bundle')
19
+ const shouldIncludeMjs = !!process.argv.includes('--output-mjs')
19
20
  const shouldBundleNodeModules = !!process.argv.includes('--bundle-modules')
20
21
  const shouldClean = !!process.argv.includes('clean')
21
22
  const shouldCleanBuildOnly = !!process.argv.includes('clean:build')
@@ -193,25 +194,25 @@ async function buildJs() {
193
194
  platform: shouldBundle ? 'node' : 'neutral',
194
195
  })
195
196
  : null,
196
- // pkgModule
197
- // ? esbuildWriteIfChanged({
198
- // entryPoints: files,
199
- // outExtension: { '.js': '.mjs' },
200
- // outdir: flatOut ? 'dist' : 'dist/esm',
201
- // bundle: shouldBundle,
202
- // sourcemap: true,
203
- // sourcesContent: false,
204
- // target: 'node16',
205
- // keepNames: false,
206
- // jsx: 'automatic',
207
- // allowOverwrite: true,
208
- // format: 'esm',
209
- // color: true,
210
- // logLevel: 'error',
211
- // minify: process.env.MINIFY ? true : false,
212
- // platform: shouldBundle ? 'node' : 'neutral',
213
- // })
214
- // : null,
197
+ pkgModule && shouldIncludeMjs
198
+ ? esbuildWriteIfChanged({
199
+ entryPoints: files,
200
+ outExtension: { '.js': '.mjs' },
201
+ outdir: flatOut ? 'dist' : 'dist/esm',
202
+ bundle: shouldBundle,
203
+ sourcemap: true,
204
+ sourcesContent: false,
205
+ target: 'node16',
206
+ keepNames: false,
207
+ jsx: 'automatic',
208
+ allowOverwrite: true,
209
+ format: 'esm',
210
+ color: true,
211
+ logLevel: 'error',
212
+ minify: process.env.MINIFY ? true : false,
213
+ platform: shouldBundle ? 'node' : 'neutral',
214
+ })
215
+ : null,
215
216
  pkgModuleJSX
216
217
  ? esbuildWriteIfChanged({
217
218
  // only diff is jsx preserve and outdir