gapmiss_iconoir-icons/esbuild.config.mjs
@gapmiss 203986a926 feat: Modernize plugin, update Iconoir to v7.11.0
- Update ESLint to flat config
- Add GitHub release workflow
- Fix CSS conflicts and suggester icons
- Update release scripts
- Add package-lock.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-05-24 20:52:30 -05:00

42 lines
892 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');
esbuild.build({
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',
watch: !prod,
target: 'es2018',
logLevel: "info",
sourcemap: prod ? false : false,
treeShaking: true,
outfile: 'main.js',
}).catch(() => process.exit(1));