My problem was closely related to #7417, @younabobo It is documented, we can't build module from x, it is runtime value and it is impossible to detect https://webpack.js.org/api/module-methods/#dynamic-expressions-in-import, @ufon You need this #11127, we will implement it for webpack@5. How to solve this problem?. How to check whether a string contains a substring in JavaScript? jharris@hpenvy:~/fossil/anytime_webix$ npm run build, webix-jet-app@1.1.0 build /home/jharris/fossil/anytime_webix To learn more, see our tips on writing great answers. Check out the guide for more information on how webpackPreload works. The compiler will ensure that the dependency is available in the output bundle. How do I check if an element is hidden in jQuery? [38] ./sources/styles/anytime.css 39 bytes {0} [built] Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. If the current behavior is a bug, please provide the steps to reproduce. I got a folder with hundreds of SVGs in it. it's as if the current module would directly require the modules which are inside the animals directory, with the exception that none of the modules will be actually executed. anytime.css 988 bytes 0 [emitted] anytime It is very useful for lazy-loading. Dynamic import from node_modules is not working, https://github.com/Miaoxingren/webpack-issue-8934, dynamic import for chunk in node_modules is not working as expected, https://github.com/younabobo/webpack-dynamic-import-test, https://webpack.js.org/api/module-methods/#dynamic-expressions-in-import. However, this support does not work with dynamic import() Workaround. rev2023.3.3.43278. Setting TypeScript For Modern React Projects Using Webpack Webpack and Dynamic Imports: Doing it Right | by Rubens Pinheiro You also need to know that fully dynamic statements such as import (pathToFile) will not work because webpack requires at least some file location information.
Telltale Atheist Daughter, Articles W