Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What does "!!" before file-loader do in webpack 4?

Can’t find any docs around the !! in:

const styles = require('!!file-loader!./styles.css');

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

In Webpack 4, the "!!" before a loader in the webpack configuration file is called the "bang-bang" loader syntax. It is used to override the configuration specified in the webpack configuration file for a specific loader.

Here’s the link to the official Webpack documentation on loaders:
https://webpack.js.org/concepts/loaders/#inline

you can find a section called "Inline" that explains how to use the "bang-bang" loader syntax to override loader configuration.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading