-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
webpack critical dependency warning #334
Comments
After digging into the issue, I find it imported via #168 which requests a template lookup feature (just like nunjucks) via Line 31 in 251a508
Meaning:
With that being said, you can safely suppress or ignore that warning. |
Ok, thank you for clarifying this. Perhaps you can also document it in the project web or README. |
@harttle, I received a comment from the webpack team, they suggest to use a different solution to solve dynamic dependencies, via |
It's added in v12.2 thus not available for liquidjs. But I'm willing to update when Node.js 12.2 become the lowest LTS. |
Sounds good. In my other projects I also continue to use 10.x, so I think this is reasonable. |
Perhaps you should open a separate ticket to keep track of this new issue related to using |
I updated my projects to use Node 12, liquidjs to 9.36.0, and generally everything is up to date. However I still get the warning: WARNING in ./node_modules/liquidjs/dist/liquid.node.esm.js 393:15-36
Critical dependency: the request of a dependency is an expression
at RequireResolveContextDependency.getWarnings (/Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/webpack/lib/dependencies/ContextDependency.js:91:18)
at Compilation.reportDependencyErrorsAndWarnings (/Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/webpack/lib/Compilation.js:3132:24)
at /Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/webpack/lib/Compilation.js:2729:28
at _next2 (eval at create (/Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:16:1)
at eval (eval at create (/Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:42:1)
at /Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:385:11
at /Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/neo-async/async.js:2830:7
at Object.each (/Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/neo-async/async.js:2850:39)
at /Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:361:18
at /Users/ilg/My Files/WKS Projects/xpack.github/vscode-extensions/vscode-xpack-extension-ts.git/node_modules/neo-async/async.js:2830:7 |
🎉 This issue has been resolved in version 9.36.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I updated my project to refer to 9.42.0, but webpack still complains:
What might be wrong? |
I'll try to create a demo repo for this, will ping back if I find something. |
Sure, please let me know if there is anything I can do to help you. |
This liquidjs/demo/esm/todolist.liquid Line 2 in 32f613f
But in webpack, I think it's kind of expected. Maybe we need figuire out how to suppress it if not revelant to the final repo, or how to config webpack to make it working if it's indeed useful. I think documentation effort is enough for this issue, how do you think? |
I don't know, this seems a bit too technical for me. From a user point of view, the warning thrown by webpack is a concern; you, as the author, can asses that it is not harmful, but me, as the less knowledgeable user whose general strategy is to avoid all warnings, can not, so whenever I see it I'm concerned. :-( So, if you, together with the webpack team, can find a solution to suppress this warning, it would be great. |
"loading partials from node modules" is no longer supported in LiquidJS when compiled by webpack. webpack tries to pack all dependencies (including ones in Adding the following into your webpack config will suppress this warning: // Here's a demo for using Liquid with webpack
// https://github.com/harttle/liquidjs/tree/master/demo/webpack
plugins: [
new (require('webpack').ContextReplacementPlugin)(/liquidjs/)
], |
I confirm that with this definition added to Thank you very much! |
Hi,
I'm successfully using liquidjs in my projects for a while, but today I encountered a small issue while trying to pack it in a VSCode extension, webpack reported the following:
In line 254 of
liquid.node.esm.js
there isrequire
object, which apparently confuses webpack:The webpack documentation warns that these messages should be taken seriously:
I'm quite new to webpack/VSCode extensions/TypeScript, so I don't have a solution, but it would be great to have a webpack friendly liquidjs, in order to avoid workarounds like having to exclude liquidjs from web bundles.
Thank you in advance,
Liviu
The text was updated successfully, but these errors were encountered: