You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand Webpack is a static bundler and I believe this information is available at compile time. The queryString is used as part of our webpack config for detecting if we want to use responsive images or not and thusly which loader. As far as I can tell this is a bug because this is not making the image imports anymore dynamic.
If the current behavior is a bug, please provide the steps to reproduce.
Dynamically Import a folder of images and add a query string as part of the promise.
What is the expected behavior?
Images with dynamic loading through webpack should be able to have static query strings passed into them or at least for usage internally inside webpack.
Other relevant information:
webpack version:
"webpack": "^4",
Node.js version:
"node": "8.11.3"
Operating System:
MacOs High Sierra
Additional tools:
Sorry if this intended behaviour and i'm wrong, but this seems like a bug to me. Let me know if you want a better example :) and thanks for the good work!
The text was updated successfully, but these errors were encountered:
skingston91
changed the title
Webpack4 query string in Dynamic Require
Query string in Dynamic Require Webpack4
Jul 24, 2018
skingston91
changed the title
Query string in Dynamic Require Webpack4
Static Query string in Dynamic Require Webpack4
Jul 24, 2018
skingston91
changed the title
Static Query string in Dynamic Require Webpack4
Static Query string in Dynamic Imports Webpack4
Jul 24, 2018
Bug report
What is the current behavior?
All of these imports work:
However anything requiring a query string in a dynamic name import returns the below error.
Dynamic Import and usage:
This has been bought up previously in the webpack stack overflow, the closet is below:
https://stackoverflow.com/questions/46652079/webpack3-query-string-in-dynamic-require-or-single-file-multiple-outputs from a year ago.
I understand Webpack is a static bundler and I believe this information is available at compile time. The queryString is used as part of our webpack config for detecting if we want to use responsive images or not and thusly which loader. As far as I can tell this is a bug because this is not making the image imports anymore dynamic.
If the current behavior is a bug, please provide the steps to reproduce.
Dynamically Import a folder of images and add a query string as part of the promise.
What is the expected behavior?
Images with dynamic loading through webpack should be able to have static query strings passed into them or at least for usage internally inside webpack.
Other relevant information:
webpack version:
"webpack": "^4",
Node.js version:
"node": "8.11.3"
Operating System:
MacOs High Sierra
Additional tools:
Sorry if this intended behaviour and i'm wrong, but this seems like a bug to me. Let me know if you want a better example :) and thanks for the good work!
The text was updated successfully, but these errors were encountered: