A vite plugin that manages your package.json for you, both locally and for publishing
MIT License
A vite plugin to fill out your package.json
files for its local and published
variants.
Add it to the plugins
array in your vite.config.ts
file!
It is also wrapping vite-plugin-dts!
import { defineConfig } from 'vite';
import { pakk } from 'vite-plugin-pakk';
export default defineConfig({
plugins: [pakk()],
});
index.ts
will be treated as the default export, and any additional filespackage.json
file too! For types
it will point to./src/index.ts
) but for the actual code, itoutDir
(./dist/index.js
). This ensures that you buildpackage.json
file so it points to the correct./index.d.ts
) and ESM/CJS files (./index.js
,./index.cjs
)bin
will be treated as bins for the package. Shimspnpm
when they create symlinks.static
folder next to src
too to export non-js files likedts
generator plugin present!