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

Use eval('require') instead of require to avoid bundler error #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hzy
Copy link

@hzy hzy commented Oct 19, 2021

Use eval('require') instead of require to avoid bundler error.

This allow this package continue work with Node.js and can avoid a bundler error.

This PR fixes #11

@hzy
Copy link
Author

hzy commented Oct 19, 2021

@papnkukn Would u PTAL :) ?

@aralroca
Copy link

I think make sense to avoid Webpack errors

@trasherdk
Copy link

It makes more sense to avoid eval() at any cost.

@Tofandel
Copy link

Tofandel commented Jan 13, 2023

Can't we provide a build for browsers without the save function and one for node?

NPM provides the feature to automatically import the correct version using

"exports": {
    "browser": {
      "default": "./qrcode.browser.min.js",
    },
    "default": "./qrcode.min.js",
}

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.

Webpack Module not found: Error: Can't resolve 'fs' in 'node_modules/qrcode-svg/lib'
4 participants