Skip to content

Commit

Permalink
Update rollup.config.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
masx200 committed Sep 21, 2024
1 parent 416260b commit 683a13c
Showing 1 changed file with 8 additions and 66 deletions.
74 changes: 8 additions & 66 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import commonjs from "@rollup/plugin-commonjs";
// import babel from "@rollup/plugin-babel";
import { defineConfig } from "rollup";
import json from "@rollup/plugin-json";
import resolve from "@rollup/plugin-node-resolve";
import { defineConfig } from "rollup";
// import externals from "rollup-plugin-node-externals";
import rollupExternalModules from "rollup-external-modules";
import { terser } from "rollup-plugin-terser";
import ts from "rollup-plugin-ts";
import rollupExternalModules from "rollup-external-modules";

const banner = `#!/usr/bin/env node`;
const terserplugin = terser({
compress: {
ecma: 2015,
toplevel: true,
unused: true,
// drop_console: true,

drop_debugger: true,
// pure_funcs: ["console.log"],
},
module: true,
mangle: true,
Expand All @@ -24,22 +22,7 @@ const terserplugin = terser({
export default defineConfig([
{
external: rollupExternalModules,
// external: [
// "minimist",
// "koa",
// "webdav-server",
// "depd",
// "bluebird",
// "@masx200/serve-cli",
// "http-auth",
// "process",
// "net",
// "koa-logger",
// "url",
// "http",
// "https",
// "http-auth/src/auth/utils.js",
// ],

input: "./src/webdav-cli.cli.ts",
output: [
{
Expand All @@ -49,39 +32,11 @@ export default defineConfig([
format: "esm",
},
],
plugins: [
// externals({
// builtins: true,
// deps: true,
// devDeps: true,
// peerDeps: true,
// optDeps: true,
// }),
ts(),
resolve(),
commonjs(),
terserplugin,
json(),
],
plugins: [ts(), resolve(), commonjs(), terserplugin, json()],
},
{
external: rollupExternalModules,
// external: [
// "minimist",
// "koa",
// "webdav-server",
// "depd",
// "bluebird",
// "@masx200/serve-cli",
// "http-auth",
// "process",
// "net",
// "koa-logger",
// "url",
// "http",
// "https",
// "http-auth/src/auth/utils.js",
// ],

input: "./src/index.ts",
output: [
{
Expand All @@ -91,19 +46,6 @@ export default defineConfig([
format: "esm",
},
],
plugins: [
// externals({
// builtins: true,
// deps: true,
// devDeps: true,
// peerDeps: true,
// optDeps: true,
// }),
ts(),
resolve(),
commonjs(),
terserplugin,
json(),
],
plugins: [ts(), resolve(), commonjs(), terserplugin, json()],
},
]);

0 comments on commit 683a13c

Please sign in to comment.