Try cookiecutter
This commit is contained in:
22
{{ cookiecutter.project_slug }}/rollup.config.mjs
Normal file
22
{{ cookiecutter.project_slug }}/rollup.config.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
import nodeResolve from "@rollup/plugin-node-resolve";
|
||||
import json from "@rollup/plugin-json";
|
||||
import typescript from "rollup-plugin-typescript2";
|
||||
import { terser } from "rollup-plugin-terser";
|
||||
import { getBabelOutputPlugin } from "@rollup/plugin-babel";
|
||||
|
||||
const dev = process.env.ROLLUP_WATCH;
|
||||
|
||||
export default {
|
||||
input: "src/main.ts",
|
||||
output: {
|
||||
file: "{{ cookiecutter.project_file }}.js",
|
||||
format: "es",
|
||||
},
|
||||
plugins: [
|
||||
nodeResolve(),
|
||||
json(),
|
||||
typescript(),
|
||||
getBabelOutputPlugin({ presets: ["@babel/preset-env"] }),
|
||||
!dev && terser({ format: { comments: false } }),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user