diff --git a/CHANGELOG.md b/CHANGELOG.md index 564df8a..f578ff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +## 0.3.0 + +# Improve and Features + +- Upgrade stylex compiler. +- Perf patchAlias logic. +- Reduce package sizes. + +# Patches + +- Fix can't load `virtual:css` in watch mode. #5 + ## 0.2.5 # Patches diff --git a/examples/vite-react-demo/package.json b/examples/vite-react-demo/package.json index 59f5ecd..fa87610 100644 --- a/examples/vite-react-demo/package.json +++ b/examples/vite-react-demo/package.json @@ -3,7 +3,8 @@ "scripts": { "dev": "vite", "build": "vite build", - "preview": "vite preview" + "preview": "vite preview", + "watch": "vite build --watch" }, "devDependencies": { "@types/react": "^18.2.45", diff --git a/package.json b/package.json index 001bb8c..e459604 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vite-plugin-stylex-dev", - "version": "0.2.5", + "version": "0.3.0", "description": "an unofficial stylex vite plugin", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 0052723..97bdac6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -112,7 +112,7 @@ export function stylexPlugin(opts: StylexPluginOptions = {}): Plugin { let viteServer: ViteDevServer | null = null const viteCSSPlugins: Plugin[] = [] const processStylexRules = () => { - const rules = Object.values(stylexRules).flat() + const rules = Object.values(stylexRules).flat().filter(Boolean) if (!rules.length) return return stylexBabelPlugin.processStylexRules(rules, useCSSLayers) }