You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

31 lines
918 B

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,
}),
}),
],
};