Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
feat: re-enable identifier minification (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber authored Aug 20, 2022
1 parent 4687e8a commit 036b48e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/transform/get-esbuild-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ export const getEsbuildOptions = (
* Smaller output for cache and marginal performance improvement:
* https://twitter.com/evanwallace/status/1396336348366180359?s=20
*/
/**
* Disabled until esbuild supports names in source maps:
* https://github.com/evanw/esbuild/issues/1296
*/
// minify: true,
minify: true,
keepNames: true,
minifySyntax: true,
minifyWhitespace: true,

...extendOptions,
};
Expand Down
2 changes: 2 additions & 0 deletions tests/specs/transform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default testSuite(({ describe }) => {

expect(map.sources.length).toBe(1);
expect(map.sources[0]).toBe(fileName);
expect(map.names).toStrictEqual(['file_default', 'named', 'functionName', '__name']);
});
});

Expand Down Expand Up @@ -110,6 +111,7 @@ export default testSuite(({ describe }) => {

expect(map.sources.length).toBe(1);
expect(map.sources[0]).toBe(fileName);
expect(map.names).toStrictEqual(['file_default', 'named', 'functionName', '__name']);
});
});
});
Expand Down

0 comments on commit 036b48e

Please sign in to comment.