Skip to content

Commit

Permalink
Complement #865 - documentation (#882)
Browse files Browse the repository at this point in the history
* Complement #865 - documentation

* A little bit detailing

---------

Co-authored-by: Jeongho Nam <[email protected]>
  • Loading branch information
MarArMar and samchon authored Nov 26, 2023
1 parent d27f19c commit ee76e15
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions website/pages/docs/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,33 @@ export default defineConfig({
esbuild: false,
plugins: [
react(),
typescript()
]
typescript(),
],
});
```

By the way, if you're composing monorepo, and need to import some external TypeScript files from the other package of the monorepo, you've to configure the `vite.config.ts` a little bit different. When declaring `typescript` plugin, you've to specify `include` and `excluude` options like below.

```typescript filename="vite.config.ts" copy showLineNumbers
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import typescript from "rollup-plugin-typescript2";

// https://vitejs.dev/config/
export default defineConfig({
esbuild: false,
plugins: [
react(),
typescript({
// WHEN MONOREPO
include: [
"./**/*.ts+(|x)",
"../../core/**/*.ts+(|x)",
"../../util/**/*.ts+(|x)",
],
exclude: ["../../node_modules"],
}),
],
});
```

Expand Down

0 comments on commit ee76e15

Please sign in to comment.