import resolve from "@rollup/plugin-node-resolve"; import commonjs from "@rollup/plugin-commonjs"; import generatePackageJson from "rollup-plugin-generate-package-json"; import typescript from '@rollup/plugin-typescript'; export default { input: "src/main.ts", output: { file: `dist/${process.env.npm_package_name}/main.js`, format: "cjs", inlineDynamicImports: true, }, plugins: [ typescript(), resolve({ preferBuiltins: true, }), commonjs(), generatePackageJson({ outputFolder: `dist/${process.env.npm_package_name}/`, baseContents: (pkg) => ({ name: pkg.name, version: pkg.version, description: pkg.description, author: pkg.author, main: "main.js", private: true, }), }), ], };