Added as a regular webpack plugin in my config, when building (with or without the watch flag) the bundle, the font faces and the font-family are all untouched.
It should apply the expected transformation per font.
ℹ️ Additional context
The config uses the following loaders for SCSS and CSS:
MiniCssExtractPlugin
css-loader
postcss-loader
sass-loader
It also uses stylelint to lint the files.
The postcss config is pretty straight forward as it consists of the default configurations of the following plugins:
autoprefixer
postcss-preset-env
cssnano
Fonts are processed using Webpack 5's asset/module system (instead of file-loader for instance). "Static" fonts that aren't meant to change are not touched by webpack, but referenced in URLs (pointing to the correct file from the main css file's perspective).
NB: I've also tried with file-loader instead, the result is the same
🐛 The bug
Added as a regular webpack plugin in my config, when building (with or without the watch flag) the bundle, the font faces and the
font-family
are all untouched.🛠️ To reproduce
https://stackblitz.com/edit/webpack-webpack-js-org-7bs3qn?file=webpack.config.js
🌈 Expected behaviour
It should apply the expected transformation per font.
ℹ️ Additional context
The config uses the following loaders for SCSS and CSS:
It also uses stylelint to lint the files.
The postcss config is pretty straight forward as it consists of the default configurations of the following plugins:
Fonts are processed using Webpack 5's asset/module system (instead of
file-loader
for instance). "Static" fonts that aren't meant to change are not touched by webpack, but referenced in URLs (pointing to the correct file from the main css file's perspective).NB: I've also tried with
file-loader
instead, the result is the same