fix(packages/tuono): styles are not in the page when running tuono dev (#220)

This commit is contained in:
Marco Pasqualetti
2024-12-11 13:59:47 +01:00
committed by GitHub
parent a0cdf408a1
commit 5bb9cf1e7c
+11 -1
View File
@@ -32,7 +32,17 @@ function createBaseViteConfigFromTuonoConfig(
plugins: [
...(tuonoConfig.vite?.plugins ?? []),
react(),
/**
* even if `include` is not a valid option for this
* plugin, we have to use it.
* If not specified, when running `tuono dev`, the mdx
* won't be compiled include any style in the page and it might
* seem broken.
*/
// @ts-expect-error see above comment
react({ include: /\.(jsx|js|mdx|md|tsx|ts)$/ }),
ViteFsRouter(),
LazyLoadingPlugin(),
],