Skip to content

Commit

Permalink
parcel: minification fix for typescript benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
evanw committed Oct 15, 2023
1 parent 0449311 commit cc679e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1049,9 +1049,13 @@ bench-rome-parcel2: | require/parcel2/node_modules bench/rome bench/rome-verify
# Also inject "includeNodeModules": true or the aliases will be ignored.
cat require/parcel2/package.json | sed '/^\}/d' > bench/rome/parcel2/package.json
echo ', "engines": { "node": "14.0.0" }' >> bench/rome/parcel2/package.json
echo ', "targets": { "main": { "includeNodeModules": true } }' >> bench/rome/parcel2/package.json
echo ', "targets": { "main": { "includeNodeModules": true, "optimize": true } }' >> bench/rome/parcel2/package.json
echo ', $(ROME_PARCEL_ALIASES) }' >> bench/rome/parcel2/package.json

# Parcel's minifier preserves all comments in the source code by default.
# Removing comments in the minified output requires a config file.
echo '{ "format": { "comments": false } }' > bench/rome/parcel2/.terserrc

cd bench/rome/parcel2 && time -p node_modules/.bin/parcel build entry.ts --dist-dir . --cache-dir .cache
du -h bench/rome/parcel2/entry.js*
cd bench/rome-verify && rm -fr parcel2 && ROME_CACHE=0 node ../rome/parcel2/entry.js bundle packages/rome parcel2
Expand Down

0 comments on commit cc679e0

Please sign in to comment.