Gathering detailed insights and metrics for @ryoppippi/unplugin-typia
Gathering detailed insights and metrics for @ryoppippi/unplugin-typia
Gathering detailed insights and metrics for @ryoppippi/unplugin-typia
Gathering detailed insights and metrics for @ryoppippi/unplugin-typia
unplugin for Typia with an extra Bun plugin 🫶
npm install @ryoppippi/unplugin-typia
Typescript
Module System
Node Version
NPM Version
TypeScript (99.13%)
JavaScript (0.87%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
NOASSERTION License
70 Stars
917 Commits
14 Forks
1 Watchers
23 Branches
7 Contributors
Updated on Jul 03, 2025
Latest Version
2.6.5
Package Id
@ryoppippi/unplugin-typia@2.6.5
Unpacked Size
130.11 kB
Size
38.44 kB
File Count
59
NPM Version
10.9.2
Node Version
22.16.0
Published on
Jun 10, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
unplugin for Typia
Typia is fantastic, but it is hard to setup, even for frontend development.
If you use some bundlers for frontend like Vite
, it is even harder to setup.
This unplugin aims to make it easier to use Typia in your projects.
First, install unplugin-typia
:
1# npm 2npm install -D @ryoppippi/unplugin-typia
Then, install typia
:
1# install typia! (nypm detects your PM ✨) 2npx nypm add typia 3 4# setup typia! 5npx typia setup 6# pnpm dlx typia setup 7# yarn dlx typia setup 8 9# after installing typia, run prepare script 10npm run prepare
More details about setting up Typia can be found in the Typia Docs.
Then, add the unplugin to your favorite bundler:
1// vite.config.ts 2import UnpluginTypia from '@ryoppippi/unplugin-typia/vite'; 3 4export default defineConfig({ 5 plugins: [ 6 UnpluginTypia({ tsconfig: './tsconfig.app.json' /* options */ }), // should be placed before other plugins like `react`, `svetle`, etc. 7 ], 8});
When using typia with types imported from non-relative paths like tsconfig
compilerOptions.paths
or relative to tsconfigcompilerOptions.baseUrl
, they must be defined in vite.config.ts under resolve.alias in order to be resolved, according to vite's resolution mechanism.
Examples:
1// esbuild.config.js 2import UnpluginTypia from '@ryoppippi/unplugin-typia/esbuild'; 3 4export default { 5 plugins: [ 6 UnpluginTypia({ /* options */ }), 7 ], 8};
Examples:
1// next.config.mjs 2import unTypiaNext from 'unplugin-typia/next'; 3 4/** @type {import('next').NextConfig} */ 5const nextConfig = { /* your next.js config */}; 6 7/** @type {import("unplugin-typia").Options} */ 8const unpluginTypiaOptions = { /* your unplugin-typia options */ }; 9 10export default unTypiaNext(nextConfig, unpluginTypiaOptions); 11 12// you can omit the unplugin-typia options when you don't need to customize it 13// export default unTypiaNext(nextConfig);
Examples:
1// build.ts 2import UnpluginTypia from '@ryoppippi/unplugin-typia/bun'; 3 4await Bun.build({ 5 entrypoints: ['./index.ts'], 6 outdir: './out', 7 plugins: [ 8 UnpluginTypia({ /* your options */}) 9 ] 10});
For building the script:
1bun run ./build.ts 2node ./out/index.js
Check the Plugins – Bundler | Bun Docs for more details.
1// preload.ts 2import { plugin } from 'bun'; 3import UnpluginTypia from '@ryoppippi/unplugin-typia/bun'; 4 5plugin(UnpluginTypia({ /* your options */}));
1# bun.toml 2preload = "preload.ts" 3 4[test] 5preload = "preload.ts"
For running the script:
1bun run ./index.ts
Check the Plugins – Runtime | Bun Docs for more details.
1// rollup.config.js 2import UnpluginTypia from '@ryoppippi/unplugin-typia/rollup'; 3 4export default { 5 plugins: [ 6 UnpluginTypia({ /* options */ }), 7 ], 8};
Examples:
1// webpack.config.js 2 3const { default: UnpluginTypia } = require('@ryoppippi/unplugin-typia/webpack'); 4 5module.exports = { 6 plugins: [ 7 UnpluginTypia({ /* options */ }), 8 ], 9};
You can find examples in the examples/
.
.ts
.tsx
.mts
.mtsx
.svelte
(only script tag with lang="ts"
)This repository is a monorepo managed by Bun.
1bun i --frozen-lockfile
This project started as an unofficial integration of Typia for bundlers. Now, this plugin is one of the official integrations of Typia and is sponsored by @samchon (the creator of Typia).
No vulnerabilities found.
No security vulnerabilities found.