Closed karyanayandi closed 2 years ago
@harlan-zw Hi, I can reproduce this issue on my side too, I think we might need to make the @windicss/plugin-utils
compatible with custom extractor which return undefined tags, attributes values, etc.
The relevant code changed to this should work, and if it does, I'm happy to mention a PR:
@karyanayandi A temporary solution here can be configured like this:
export default defineConfig({
extract: {
include: [
"./packages/**/**/**/*{.js,.jsx,.ts,.tsx}",
"./packages/**/**/**/**/*{.js,.jsx,.ts,.tsx}",
],
extractors: [
{
extractor: (content) => {
return {
classes: content.match(/(?<=class:)[!@\w-]+/g) ?? [],
attributes: {
names: [],
values: [],
},
tags: [],
ids: []
}
},
extensions: ["tsx"],
},
],
},
})
Hey @await-ovo
Thanks for being proactive with that PR, have pushed up a new version 1.6.10 using the utils change
Describe the bug I use storybook with windicss webpack plugin and use extractors option like on documentation but there's error like below.
this is my windicss config