gavvvr_obsidian-imgur-plugin/scripts/esbuild.config.js
Kirill Gavrilov e2c6e779c1 build: refactor build setup to develop without 'obsidian-plugin-cli'
2 reasons to remove 'obsidian-plugin-cli' dependency:
- it uses its own esbuild config, which might be different from the one used for prod build
- it brings lots of unused stuff (including deprecated transitive dependencies)
2024-08-24 09:08:52 +03:00

36 lines
765 B
JavaScript

// @ts-check
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
*/
`
/** @type {import("esbuild").BuildOptions} */
export const sharedEsbuildConfig = {
banner: {
js: banner,
},
entryPoints: ['src/ImgurPlugin.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',
],
format: 'cjs',
target: 'es2018',
logLevel: 'info',
sourcemap: 'inline',
treeShaking: true,
}