-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: size comparison not needed here
- Loading branch information
Showing
14 changed files
with
2,241 additions
and
14 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
__tests__/__fixtures__/issues/issue-87/.analyzer/base/bundle/bundle_analysis.json
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,27 @@ | ||
{ | ||
"out/meta.json -> out/no-change.js": { | ||
"metafile": "out/meta.json", | ||
"outfile": "out/no-change.js", | ||
"bytes": 733190 | ||
}, | ||
"out/meta.json -> out/decreased.js": { | ||
"metafile": "out/meta.json", | ||
"outfile": "out/decreased.js", | ||
"bytes": 50000 | ||
}, | ||
"out/meta.json -> out/bit-increased.js": { | ||
"metafile": "out/meta.json", | ||
"outfile": "out/bit-increased.js", | ||
"bytes": 44000 | ||
}, | ||
"out/meta.json -> out/much-increased.js": { | ||
"metafile": "out/meta.json", | ||
"outfile": "out/much-increased.js", | ||
"bytes": 20000 | ||
}, | ||
"out/meta.json -> out/missing.js": { | ||
"metafile": "out/meta.json", | ||
"outfile": "out/missing.js", | ||
"bytes": 12345 | ||
} | ||
} |
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,27 @@ | ||
import { writeFileSync } from "node:fs"; | ||
import { build } from "esbuild"; | ||
import metaUrlPlugin from '@chialab/esbuild-plugin-meta-url'; | ||
|
||
const result = await build({ | ||
entryPoints: [ | ||
`./src/no-change.ts`, | ||
`./src/bit-increased.ts`, | ||
`./src/much-increased.ts`, | ||
`./src/decreased.ts`, | ||
`./src/new-outfile.ts`, | ||
`./src/file-imported.ts`, | ||
], | ||
outdir: `out`, | ||
format: "esm", | ||
metafile: true, | ||
mainFields: ["module", "main"], | ||
platform: "node", | ||
target: "node20.9", | ||
bundle: true, | ||
plugins: [ | ||
metaUrlPlugin(), | ||
], | ||
sourcemap: true, | ||
}); | ||
|
||
writeFileSync(`out/meta.json`, JSON.stringify(result.metafile, null, 2)); |
Oops, something went wrong.