#unocss doesn't have styles in preview

3 messages · Page 1 of 1 (latest)

odd elk
#

When I use unocss in dev, it works great, but in prod the css is missing all the used classes. Only the base is there.

It's as if it can't discover the classnames in the prod build?

Did anybody get this working?

odd elk
lethal vault
#

I've worked around it by adding the content pipeline to my uno.config.ts

  content: {
    pipeline: {
      include: [
        /\.([jt]sx?|mdx?)($|\?)/,
      ],
    },
  },