Skip to content

Commit

Permalink
feat: use binary loader for .node files
Browse files Browse the repository at this point in the history
  • Loading branch information
ambar committed Dec 24, 2023
1 parent a3f65b2 commit 9272c9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion measure-bundle-size/src/measure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ const bundle = async (
* - respect 'browser' field in package.json
* - production build, respect `NODE_ENV`
*
* TODO: add loader for `.node`
* @see https://esbuild.github.io/api/#build-api
*/
const buildResult = await esbuild.build({
Expand All @@ -198,6 +197,9 @@ const bundle = async (
outfile: '<bundle>.js',
absWorkingDir: workingDir,
plugins: [builtinExternalPlugin, peerExternalPlugin],
loader: {
'.node': 'binary',
},
external,
target: 'esnext',
format: 'esm',
Expand Down

0 comments on commit 9272c9f

Please sign in to comment.