Skip to content

Commit

Permalink
Merge branch 'v5.3' of https://github.com/samchon/typia into v5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
samchon committed Nov 26, 2023
2 parents d44151c + ee76e15 commit 3cdfcf6
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 3cdfcf6

Please sign in to comment.