Skip to content

Doesn't seem to work with Webpackย #291

Description

@Voltra

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions