mirror of
https://github.com/gavvvr/obsidian-imgur-plugin.git
synced 2026-07-22 05:10:27 +00:00
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)
36 lines
765 B
JavaScript
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,
|
|
}
|