Skip to content

Tag: webpack

How to work with sass @use and webpack sass-loader

In my project i found that i had styles duplications injected into my page, so to solve this problem i have move to @use instead of using @import. After this move i have found that it gave me duplications too even if into the documentation it says that you can use @use without getting duplications. I have fou…

Multiple stylesheet does not working with Webpack 5.11.0

Swiper bundler CSS has a base64 font-face, When I was trying to load it into my index.ts (main entry) file it gives me the following error. I was tried a lot of loaders (url-loader, base64-font-loader, etc) for this but none of these were worked for me. How can I fix this problem? Which loader should I use to…

Webpack Configuration Error – where is the bug?

I try to run “node index.js” and get the following error message: ValidationError: Invalid configuration object. Webpack has been initialized using a configuration object that does not match the API schema. configuration.module.rules[0] should be one of these: [“…” | object { com…

Webpack 5 and ESM

I think I’ve read every thread on SO and every related page on the internet on this, everything has some variation of a problem I want: To use webpack to bundle my web app up To use ES Modules within my source js and have them transpiled down for wider browser support To use ES Modules within my webpack…