英文:
What does "!!" before file-loader do in webpack 4?
问题
无法找到关于 !!
的文档:
英文:
Can't find any docs around the !!
in:
const styles = require('!!file-loader!./styles.css');
答案1
得分: 1
在Webpack 4中,webpack配置文件中loader前面的"!!"被称为"bang-bang" loader语法。它用于覆盖webpack配置文件中特定loader的配置。
这是官方Webpack文档关于loaders的链接:
https://webpack.js.org/concepts/loaders/#inline
你可以在一个名为"Inline"的部分找到说明如何使用"bang-bang" loader语法来覆盖loader配置的内容。
英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论