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

Fix: webpack config for plugins #2954

Merged
merged 3 commits into from
Jul 1, 2023
Merged

Fix: webpack config for plugins #2954

merged 3 commits into from
Jul 1, 2023

Conversation

katspaugh
Copy link
Owner

Short description

Resolves #2953

Implementation details

When importing a UMD module in Node.js, it's interpreted as a CommonJS module and should not assume any global variables.
So I've added a check to export into a global WaveSurfer object if it's available (browser), or export to the global this (Node.js).

@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 4 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@cloudflare-pages
Copy link

cloudflare-pages bot commented Jul 1, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: ac783e5
Status: ✅  Deploy successful!
Preview URL: https://24249e33.wavesurfer-js.pages.dev
Branch Preview URL: https://fix-webpack.wavesurfer-js.pages.dev

View logs

@katspaugh katspaugh merged commit 260cec9 into beta Jul 1, 2023
4 checks passed
@katspaugh katspaugh deleted the fix-webpack branch July 1, 2023 19:18
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.

Uncaught ReferenceError: WaveSurfer is not defined
1 participant