windicss / windicss-webpack-plugin

🍃 Windi CSS for webpack ⚡
https://windicss.org/integrations/webpack.html
79 stars 19 forks source link

default fontFamily change not working #120

Closed Coachonko closed 1 year ago

Coachonko commented 1 year ago

My configuration

import { defineConfig } from 'windicss/helpers';

export default defineConfig( {
  extract: {
    include: [
      './src/**/*.{html,js,jsx,css}',
      './public/**/*.{html,js,jsx,css}'
    ],
  },
  theme: {
    fontFamily: {
      "sans": [
        "Candid",
        ...defaultTheme.fontFamily.sans
      ],
    },
  },
} );

Out puts

.font-sans {
  font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

The string "Candid" is ignored, in fact I think the setting is ignored entirely. The configuration

import { defineConfig } from 'windicss/helpers';

export default defineConfig( {
  extract: {
    include: [
      './src/**/*.{html,js,jsx,css}',
      './public/**/*.{html,js,jsx,css}'
    ],
  },
  theme: {
    fontFamily: {
      "sans": [
        "deez walnuts"
      ],
    },
  },
} );

Outputs the same

.font-sans {
  font-family: ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}
Coachonko commented 1 year ago

After 2 webpack restarts, it suddenly works