ttypescript
ttypescript copied to clipboard
How to use it in vite?
Any extra configuration except changes in tsconfig.json ? Because I got an err said
This module should not be used in runtime. Instead, use a transformer during compilation.
Which means the configuration doesn't work at all.
I found an answer from typia documentation: https://github.com/samchon/typia/wiki/Setup#vite.
In my case I configured vite through this vitest.config.ts:
import typescript from '@rollup/plugin-typescript';
import ttsc from 'ttypescript';
import { defineConfig } from 'vitest/config';
export default defineConfig({
plugins: [typescript({ typescript: ttsc })],
});