uppinote20_obsidian-auto-no.../esbuild.config.mjs
uppinote e363253371 chore: address community scorecard warnings (manifest, build, css)
- manifest.json: authorUrl을 repo URL → author profile URL로 변경
  (커뮤니티 가이드라인은 개인/조직 프로필을 기대함)
- esbuild.config.mjs + package.json: 외부 의존성 builtin-modules 제거,
  Node 내장 module.builtinModules로 대체
- styles.css: text-decoration / text-decoration-color 분리 선언을
  border-bottom으로 대체 (Obsidian 1.4.5 부분 지원 회피)
- styles.css: .ani-field-error의 !important를 selector specificity bump
  (.setting-item-description.ani-field-error)로 대체
2026-05-27 14:50:11 +09:00

50 lines
No EOL
980 B
JavaScript

import esbuild from "esbuild";
import process from "process";
import { builtinModules } from "module";
const banner =
`/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
`;
const prod = (process.argv[2] === "production");
const context = await esbuild.context({
banner: {
js: banner,
},
entryPoints: ["src/main.ts"],
bundle: true,
external: [
"obsidian",
"electron",
"@codemirror/autocomplete",
"@codemirror/collab",
"@codemirror/commands",
"@codemirror/language",
"@codemirror/lint",
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/common",
"@lezer/highlight",
"@lezer/lr",
...builtinModules],
format: "cjs",
target: "es2018",
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
outfile: "main.js",
minify: prod,
});
if (prod) {
await context.rebuild();
process.exit(0);
} else {
await context.watch();
}