This plugin is used to shield warnings generated by the packaging tool during compilation. It can be used in webpack, rsbuild, rspack packaging environment.
npm i plugin-sass-ignore-warning
or
yarn add plugin-sass-ignore-warning
or
pnpm add plugin-sass-ignore-warning
import { pluginSassIgnoreWarnings } from 'plugin-sass-ignore-warning'
export default {
plugins: [
pluginSassIgnoreWarnings({
resourceRegExp: /^\.(scss|sass|css)$/,
contextRegExp: '',
warningNames: ['ModuleWarning'],
}),
],
}