@tamagui/build 1.2.8 → 1.2.10

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 +37 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.2.8",
3
+ "version": "1.2.10",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
package/tamagui-build.js CHANGED
@@ -170,9 +170,27 @@ async function buildJs() {
170
170
  platform: 'node',
171
171
  })
172
172
  : null,
173
+ pkgModule
174
+ ? esbuildWriteIfChanged({
175
+ entryPoints: files,
176
+ outdir: flatOut ? 'dist' : 'dist/esm',
177
+ bundle: shouldBundle,
178
+ sourcemap: true,
179
+ target: 'node16',
180
+ keepNames: false,
181
+ jsx: 'automatic',
182
+ allowOverwrite: true,
183
+ format: 'esm',
184
+ color: true,
185
+ logLevel: 'error',
186
+ minify: false,
187
+ platform: shouldBundle ? 'node' : 'neutral',
188
+ })
189
+ : null,
173
190
  pkgModule
174
191
  ? esbuildWriteIfChanged({
175
192
  entryPoints: files,
193
+ outExtension: { '.js': '.mjs' },
176
194
  outdir: flatOut ? 'dist' : 'dist/esm',
177
195
  bundle: shouldBundle,
178
196
  sourcemap: true,
@@ -188,6 +206,25 @@ async function buildJs() {
188
206
  })
189
207
  : null,
190
208
  pkgModuleJSX
209
+ ? esbuildWriteIfChanged({
210
+ // only diff is jsx preserve and outdir
211
+ jsx: 'preserve',
212
+ outdir: flatOut ? 'dist' : 'dist/jsx',
213
+ outExtension: { '.js': '.mjs' },
214
+ entryPoints: files,
215
+ bundle: shouldBundle,
216
+ sourcemap: true,
217
+ allowOverwrite: true,
218
+ target: 'es2020',
219
+ keepNames: false,
220
+ format: 'esm',
221
+ color: true,
222
+ logLevel: 'error',
223
+ minify: false,
224
+ platform: 'neutral',
225
+ })
226
+ : null,
227
+ pkgModuleJSX
191
228
  ? esbuildWriteIfChanged({
192
229
  // only diff is jsx preserve and outdir
193
230
  jsx: 'preserve',