@tamagui/build 1.0.1-beta.67 → 1.0.1-beta.70

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 +1 @@
1
- @tamagui/build:build: cache hit, replaying output e46ef66b5f3fbfa4
1
+ @tamagui/build:build: cache hit, replaying output 832d5167db3a3167
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/build",
3
- "version": "1.0.1-beta.67",
3
+ "version": "1.0.1-beta.70",
4
4
  "bin": {
5
5
  "tamagui-build": "tamagui-build.js"
6
6
  },
package/tamagui-build.js CHANGED
@@ -95,74 +95,71 @@ if (shouldClean || shouldCleanBuildOnly) {
95
95
  }
96
96
  }
97
97
 
98
+ async function buildJs() {
99
+ if (skipJS) {
100
+ return
101
+ }
102
+ const start = Date.now()
103
+ return await Promise.all([
104
+ pkgMain
105
+ ? esbuild.build({
106
+ entryPoints: files,
107
+ outdir: 'dist/cjs',
108
+ bundle: false,
109
+ sourcemap: true,
110
+ target: 'node14',
111
+ keepNames: true,
112
+ format: 'cjs',
113
+ color: true,
114
+ logLevel: 'error',
115
+ plugins: [externalPlugin],
116
+ minify: false,
117
+ platform: 'node',
118
+ })
119
+ : null,
120
+ // dont bundle for tree shaking
121
+ pkgModule
122
+ ? esbuild.build({
123
+ entryPoints: files,
124
+ outdir: 'dist/esm',
125
+ sourcemap: true,
126
+ target: 'es2019',
127
+ keepNames: true,
128
+ format: 'esm',
129
+ color: true,
130
+ logLevel: 'error',
131
+ minify: false,
132
+ platform: 'neutral',
133
+ })
134
+ : null,
135
+ esbuild.build({
136
+ // only diff is jsx preserve and outdir
137
+ jsx: 'preserve',
138
+ outdir: 'dist/jsx',
139
+ entryPoints: files,
140
+ sourcemap: false,
141
+ target: 'es2019',
142
+ keepNames: true,
143
+ format: 'esm',
144
+ color: true,
145
+ logLevel: 'error',
146
+ minify: false,
147
+ platform: 'neutral',
148
+ }),
149
+ ]).then(() => {
150
+ console.log(`built js in ${Date.now() - start}ms`)
151
+ })
152
+ }
153
+
98
154
  const externalPlugin = createExternalPlugin({
99
155
  skipNodeModulesBundle: true,
100
156
  })
101
157
 
102
158
  try {
103
159
  await Promise.all([
160
+ //
104
161
  buildTsc(),
105
- ...(skipJS
106
- ? []
107
- : [
108
- pkgMain
109
- ? esbuild
110
- .build({
111
- entryPoints: files,
112
- outdir: 'dist/cjs',
113
- bundle: false,
114
- sourcemap: true,
115
- target: 'node14',
116
- keepNames: true,
117
- format: 'cjs',
118
- color: true,
119
- logLevel: 'error',
120
- plugins: [externalPlugin],
121
- minify: false,
122
- platform: 'node',
123
- })
124
- .then(() => {
125
- console.log(' >-> commonjs')
126
- })
127
- : null,
128
- // dont bundle for tree shaking
129
- pkgModule
130
- ? esbuild
131
- .build({
132
- entryPoints: files,
133
- outdir: 'dist/esm',
134
- sourcemap: true,
135
- target: 'es2019',
136
- keepNames: true,
137
- format: 'esm',
138
- color: true,
139
- logLevel: 'error',
140
- minify: false,
141
- platform: 'neutral',
142
- })
143
- .then(() => {
144
- console.log(' >-> esm')
145
- })
146
- : null,
147
- esbuild
148
- .build({
149
- // only diff is jsx preserve and outdir
150
- jsx: 'preserve',
151
- outdir: 'dist/jsx',
152
- entryPoints: files,
153
- sourcemap: false,
154
- target: 'es2019',
155
- keepNames: true,
156
- format: 'esm',
157
- color: true,
158
- logLevel: 'error',
159
- minify: false,
160
- platform: 'neutral',
161
- })
162
- .then(() => {
163
- console.log(' >-> jsx')
164
- }),
165
- ]),
162
+ buildJs(),
166
163
  ])
167
164
  } catch (error) {
168
165
  console.log('error', error)