Слияние кода завершено, страница обновится автоматически
import commonjs from "@rollup/plugin-commonjs";
import { defineConfig } from "rollup";
import json from "@rollup/plugin-json";
import resolve from "@rollup/plugin-node-resolve";
import rollupExternalModules from "rollup-external-modules";
import swc from "rollup-plugin-swc";
import { terser } from "rollup-plugin-terser";
const banner = `#!/usr/bin/env node`;
const terserplugin = terser({
compress: {
ecma: 2015,
toplevel: true,
unused: true,
drop_debugger: true,
},
module: true,
mangle: true,
output: { comments: false, beautify: true },
});
export default defineConfig([
{
external: rollupExternalModules,
input: "./src/webdav-cli.cli.ts",
output: [
{
banner,
sourcemap: true,
file: "./dist/webdav-cli.cli.js",
format: "esm",
},
],
plugins: [swcplugin(), resolve(), commonjs(), terserplugin, json()],
},
{
external: rollupExternalModules,
input: "./src/index.ts",
output: [
{
banner,
sourcemap: true,
file: "./dist/index.js",
format: "esm",
},
],
plugins: [swcplugin(), resolve(), commonjs(), terserplugin, json()],
},
]);
function swcplugin() {
return swc.default({
jsc: {
parser: {
syntax: "typescript",
},
target: "esnext",
},
});
}
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )