Skip to content

Commit

Permalink
convert node build to latin1 (#2673)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Feb 11, 2024
1 parent 94a9b56 commit 1af7a96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"docs"
],
"scripts": {
"build:node": "npx esbuild@0.19.4 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names",
"build:node": "npx esbuild@0.19.4 index-fetch.js --bundle --platform=node --outfile=undici-fetch.js --define:esbuildDetection=1 --keep-names && node scripts/strip-comments.js",
"prebuild:wasm": "node build/wasm.js --prebuild",
"build:wasm": "node build/wasm.js --docker",
"lint": "standard | snazzy",
Expand Down
8 changes: 8 additions & 0 deletions scripts/strip-comments.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'use strict'

const { readFileSync, writeFileSync } = require('node:fs')
const { transcode } = require('node:buffer')

const buffer = transcode(readFileSync('./undici-fetch.js'), 'utf8', 'latin1')

writeFileSync('./undici-fetch.js', buffer.toString('latin1'))

0 comments on commit 1af7a96

Please sign in to comment.