Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 11 commits into from
Jun 28, 2024
Merged

Conversation

fregante
Copy link
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
20 checks passed
@fregante fregante deleted the use-esbuild branch June 28, 2024 05:28
@fregante
Copy link
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.

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

export function addTests(test: string, urls: string[]): void {
Copy link
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