Skip to content

Commit 5bb9cf1

Browse files
authored
fix(packages/tuono): styles are not in the page when running tuono dev (#220)
1 parent a0cdf40 commit 5bb9cf1

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

packages/tuono/src/build/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,17 @@ function createBaseViteConfigFromTuonoConfig(
3232

3333
plugins: [
3434
...(tuonoConfig.vite?.plugins ?? []),
35-
react(),
35+
36+
/**
37+
* even if `include` is not a valid option for this
38+
* plugin, we have to use it.
39+
* If not specified, when running `tuono dev`, the mdx
40+
* won't be compiled include any style in the page and it might
41+
* seem broken.
42+
*/
43+
// @ts-expect-error see above comment
44+
react({ include: /\.(jsx|js|mdx|md|tsx|ts)$/ }),
45+
3646
ViteFsRouter(),
3747
LazyLoadingPlugin(),
3848
],

0 commit comments

Comments
 (0)