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

BUG: v0.21.6 detects 'requires' in strings in minified files #2392

Open
markwhitfeld opened this issue Apr 29, 2022 · 1 comment
Open

BUG: v0.21.6 detects 'requires' in strings in minified files #2392

markwhitfeld opened this issue Apr 29, 2022 · 1 comment

Comments

@markwhitfeld
Copy link

Demonstration

It is not simple to provide a repro based on the Code Sandbox template provided because this issue is for SystemJS v0.21.6.
Pretty simple to explain though.
If the file being loaded is a minified file, then it detects require calls from inside strings.
For example, when loading this file: https://www.unpkg.com/@tensorflow/tfjs-backend-cpu@3.16.0/dist/tf-backend-cpu.min.js
It imports the @tensorflow/tfjs-node require, which is only found within a string in a console.log('...') call.
This is related to an issue reported here: stackblitz/core#1832

I will be submitting a PR shortly to resolve this issue. 🎉

Expected Behavior

Ignore require(...) statements in strings.

Actual Behavior

When dealing with a minified file, all require statements are parsed, no matter if they are in strings or not.

@markwhitfeld markwhitfeld changed the title BUG: v0.21.6 detects requires in strings in minified files BUG: v0.21.6 detects 'requires' in strings in minified files Apr 30, 2022
@markwhitfeld
Copy link
Author

markwhitfeld commented Apr 30, 2022

Submitted PR #2393 to fix this issue. 🎉

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

No branches or pull requests

1 participant