Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with Webpack #291

Open
Voltra opened this issue Oct 30, 2023 · 0 comments
Open

Doesn't seem to work with Webpack #291

Voltra opened this issue Oct 30, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@Voltra
Copy link

Voltra commented Oct 30, 2023

๐Ÿ› 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:

  • 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

@Voltra Voltra added the bug Something isn't working label Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant