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

Critical dependency: the request of a dependency is an expression #794

Open
Cobertos opened this issue Nov 15, 2021 · 3 comments · May be fixed by #796
Open

Critical dependency: the request of a dependency is an expression #794

Cobertos opened this issue Nov 15, 2021 · 3 comments · May be fixed by #796
Assignees

Comments

@Cobertos
Copy link

When I bundle this library in my project, I get the following warning

WARNING in ./node_modules/filer/dist/filer.min.js 1:292-296
Critical dependency: the request of a dependency is an expression
 @ ./app/elements/REPLList.js 2:0-34 5:11-23
 @ ./app/index.js 3:0-46 4:107-115

It seems to be due to how Parcel bundles and exposes a require() where the path is an expression (at filer.min.js 1:292-296 you'll find require(t) instead of require('string')).

While I've found a workaround for the moment, it's annoying and hacky. It seems like Parcel 2 fixes this? Was wondering if filer would eventually upgrade to Parcel 2?

@humphd
Copy link
Contributor

humphd commented Nov 15, 2021

Agree this should be done. Switching to Parcel 2 is something I'd take a PR for, but it's not something I'm likely to do soon due to my schedule.

@joshuali7536
Copy link

Hi, I would like to take a shot at fixing this issue.

@humphd
Copy link
Contributor

humphd commented Nov 15, 2021

@joshuali7536 sounds good. NOTE: the use of parcel is not critical here. Ideally the move to Parcel 2 should be the easiest thing to do (start with that); but if moving to rollup or something else is easier, I'd be open to that too. The goal here is, "no security issues in the bundling toolchain..."

@joshuali7536 joshuali7536 linked a pull request Nov 17, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants