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

patch: fix injection of analytics key at build time #4221

Merged
merged 1 commit into from
May 9, 2024

Conversation

aethernet
Copy link
Contributor

When we switched to electron-forge, we moved the injection of the analytics key to a readPackageJson hook.

This properly injects the keys in package.json. Unfortunately, the import of package.json is not dynamic and is done at build time by webpack before those keys are injected.

To circumvent the problem, this PR replaces the hook with a webpack definePlugin which will inject the key in the code at build time (it acts as a search and replace), the keys are not injected in the package.json anymore as that served no other purposes.

@aethernet aethernet requested a review from dfunckt May 8, 2024 21:14
@flowzone-app flowzone-app bot enabled auto-merge May 8, 2024 22:20
@flowzone-app flowzone-app bot merged commit ae70c20 into master May 9, 2024
51 checks passed
@flowzone-app flowzone-app bot deleted the fix-analytics-imports branch May 9, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants