unplugin-json-dts
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

unplugin-json-dts

NPM version

Automatically generate better typings for json files. Supports json modules.

Comparision of before and after screenshots

Installation

npm i unplugin-json-dts -D
Vite
// vite.config.ts
import jsonDts from 'unplugin-json-dts/vite'
export default defineConfig({
  plugins: [
    jsonDts(),
  ],
})


Rollup
// rollup.config.js
import jsonDts from 'unplugin-json-dts/rollup'
export default {
  plugins: [
    jsonDts(),
  ],
}


Webpack
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('unplugin-json-dts/webpack')()
  ]
}

Package Sidebar

Install

npm i unplugin-json-dts

Weekly Downloads

1,321

Version

1.2.0

License

MIT

Unpacked Size

9.19 kB

Total Files

21

Last publish

Collaborators

  • flixcor