Skip to content

Commit

Permalink
fix: add sideEffects:false to nested ESM package.json files
Browse files Browse the repository at this point in the history
  • Loading branch information
panva committed Jul 3, 2024
1 parent 7d6efb9 commit f3aff1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@
"scripts": {
"build": "tsc",
"build-all": "run-s clear build:*",
"build:browser": "run-s runtime-browser 'build -- -p ./tsconfig/browser.json' && echo '{\"type\": \"module\"}'> dist/browser/package.json",
"build:browser": "run-s runtime-browser 'build -- -p ./tsconfig/browser.json' && echo '{\"type\":\"module\",\"sideEffects\":false}'> dist/browser/package.json",
"build:browser-bundle": "esbuild --bundle dist/browser/index.js --format=esm --target=es2020 --outfile=dist/browser/index.bundle.js",
"build:browser-bundle-min": "esbuild --minify --bundle dist/browser/index.js --format=esm --target=es2020 --outfile=dist/browser/index.bundle.min.js",
"build:browser-umd": "rollup dist/browser/index.bundle.js --format umd --name jose -o dist/browser/index.umd.js && rollup dist/browser/index.bundle.min.js --compact --format umd --name jose -o dist/browser/index.umd.min.js",
"build:deno": "npm run-script runtime-deno && find dist/deno -name '*.ts' -type f -print0 | xargs -0 sed -i.bak -e \"s/\\.js'/.ts'/g\" -e \"s/\\.d'/.d.ts'/g\" && npm run-script sedcleanup",
"build:types": "npm run-script build -- -p ./tsconfig/types.json && cd src && find . -name '*.d.ts' -maxdepth 2 -type f -exec rsync -R \"{}\" ../dist/types \\; && cd .. && run-s -s types:find | xargs -0 sed -i.bak -e \"s/\\.js'/'/g\" -e \"s/\\.d'/'/g\" && npm run-script sedcleanup",
"build:node-cjs": "run-s runtime-node 'build -- -p ./tsconfig/node-cjs.json'",
"build:node-esm": "run-s runtime-node 'build -- -p ./tsconfig/node-esm.json' && echo '{\"type\": \"module\"}'> dist/node/esm/package.json",
"build:node-esm": "run-s runtime-node 'build -- -p ./tsconfig/node-esm.json' && echo '{\"type\":\"module\",\"sideEffects\":false}'> dist/node/esm/package.json",
"clear": "rm -Rf dist",
"sedcleanup": "find . -name '*.bak' -type f -print0 | xargs -0 rm -f",
"docs:generate": "typedoc",
Expand Down

0 comments on commit f3aff1c

Please sign in to comment.