Rollup cleanup plugin
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2023-12-09 03:39:58 +01:00
parent 706fe3688d
commit fcfed14306
3 changed files with 11 additions and 2 deletions

BIN
bun.lockb

Binary file not shown.

View File

@@ -27,6 +27,7 @@
"devDependencies": { "devDependencies": {
"bun-types": "latest", "bun-types": "latest",
"rollup": "^4.7.0", "rollup": "^4.7.0",
"rollup-plugin-cleanup": "^3.2.1",
"rollup-plugin-ts": "^3.4.5", "rollup-plugin-ts": "^3.4.5",
"typescript": "^5.3.3" "typescript": "^5.3.3"
} }

View File

@@ -1,4 +1,5 @@
import { defineConfig } from "rollup" import { defineConfig } from "rollup"
import cleanup from "rollup-plugin-cleanup"
import ts from "rollup-plugin-ts" import ts from "rollup-plugin-ts"
import pkg from "./package.json" assert { type: "json" } import pkg from "./package.json" assert { type: "json" }
@@ -6,8 +7,6 @@ import pkg from "./package.json" assert { type: "json" }
export default defineConfig({ export default defineConfig({
input: "src/index.ts", input: "src/index.ts",
plugins: [ ts() ],
output: [ output: [
{ {
file: pkg.exports["."].import.default, file: pkg.exports["."].import.default,
@@ -19,4 +18,13 @@ export default defineConfig({
format: "cjs", format: "cjs",
}, },
], ],
plugins: [
ts(),
cleanup({
comments: "jsdoc",
extensions: ["ts"],
}),
],
}) })