Skip to content
Advertisement

Tag: webpack-4

How to dynamically import SVG and render it inline

I have a function that takes some arguments and renders an SVG. I want to dynamically import that svg based on the name passed to the function. It looks like this: According to the webpack documentation for dynamic imports and the magic comment “eager”: “Generates no extra chunk. All modules are included in the current chunk and no additional network

Babel not compiling vendors chuck

I migrated to Webpack 4 and set up everything according to the Docs, however, my vendors.js chunk is not getting compiled like the main.js chunk. I have placed the vendors into the optimization.splitChunks.cacheGroups object, as the docs suggested, but didnt find a way to make these “cacheGroups” get compiled with babel. My problem is that one of the libraries has

Advertisement