-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CRWA, Tui] Try removing Babel and bundling minimally (#8074)
* remove babel from crwa and tui w/ minimal bundling * chore: remove test script in crwa
- Loading branch information
Showing
11 changed files
with
54 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,3 +21,6 @@ blog-test-project/* | |
.pnp.* | ||
*.code-workspace | ||
.nova | ||
|
||
# For esbuild. | ||
**/meta.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import fs from 'node:fs' | ||
|
||
import * as esbuild from 'esbuild' | ||
|
||
// There's minimal bundling going on here by design. Only "src/create-redwood-app.js" and "src/telemetry.js" | ||
// are bundled into a single "dist/create-redwood-app.js" file. | ||
// As we audit more of this package's dependencies, we'll remove them from a handcrafted "external" list, | ||
// instead of using the catch-all `packages: 'external'` option. | ||
const result = await esbuild.build({ | ||
entryPoints: ['src/create-redwood-app.js'], | ||
bundle: true, | ||
platform: 'node', | ||
target: ['node18'], | ||
// See https://esbuild.github.io/getting-started/#bundling-for-node. | ||
packages: 'external', | ||
outfile: 'dist/create-redwood-app.js', | ||
minify: true, | ||
|
||
// For visualizing the bundle. | ||
// See https://esbuild.github.io/api/#metafile and https://esbuild.github.io/analyze/. | ||
metafile: true, | ||
}) | ||
|
||
fs.writeFileSync('meta.json', JSON.stringify(result.metafile)) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
packages/create-redwood-app/src/__tests__/web-template.test.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import fs from 'node:fs' | ||
|
||
import * as esbuild from 'esbuild' | ||
|
||
// Since this is a library, there's no bundling going on here by design. | ||
// Instead we plan for this library to be bundled by leaf packages so-to-speak like create-redwood-app. | ||
const result = await esbuild.build({ | ||
entryPoints: ['src/index.ts'], | ||
format: 'cjs', | ||
platform: 'node', | ||
target: ['node18'], | ||
outfile: 'dist/index.js', | ||
|
||
// For visualizing the bundle. | ||
// See https://esbuild.github.io/api/#metafile and https://esbuild.github.io/analyze/. | ||
metafile: true, | ||
}) | ||
|
||
fs.writeFileSync('meta.json', JSON.stringify(result.metafile)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters