Skip to content

Don't bundle github-reserved-names (switch to esbuild)#196

Merged
fregante merged 11 commits intomainfrom
use-esbuild
Jun 28, 2024
Merged

Don't bundle github-reserved-names (switch to esbuild)#196
fregante merged 11 commits intomainfrom
use-esbuild

Conversation

@fregante
Copy link
Copy Markdown
Member

@fregante fregante commented Jun 28, 2024

@fregante fregante changed the title Don't bundle github-reserved-names Don't bundle github-reserved-names (switch to esbuild) Jun 28, 2024
@fregante fregante merged commit 4818df0 into main Jun 28, 2024
@fregante fregante deleted the use-esbuild branch June 28, 2024 05:28
@fregante
Copy link
Copy Markdown
Member Author

fregante commented Jun 28, 2024

What a pain. I just wanted a tree-shaker of valid JavaScript code but that doesn't exist, tree-shaking is only a feature of bundlers and minifiers, neither of which is needed here.

esbuild's drop-label is the closest I could get, but esbuild replaces const with var as a side effect.

Comment thread collector.ts
@@ -3,9 +3,7 @@
export const testableUrls = new Map<string, string[]>();

export function addTests(test: string, urls: string[]): void {
Copy link
Copy Markdown
Member Author

@fregante fregante Jun 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also tried many variations of --pure and --define. I wasn't able to drop this addTests helper from the source, it's needed to enable the tree-shaking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant