An alternative of @rollup/plugin-json that works better with rollup-plugin-ts
import { json } from '@codecb/rollup-plugin-json-ts';
import { defineConfig } from 'rollup';
import ts from 'rollup-plugin-ts';
const config = defineConfig({
input: './src/index.ts',
output: {
dir: './dist',
format: 'esm',
},
plugins: [json({}), ts({})],
});
export default config;