Update esbuild script to include codemirror packages as external.

This commit is contained in:
lishid 2022-01-10 09:01:38 -05:00
parent d006ed755a
commit a25092b586

View File

@ -17,7 +17,31 @@ esbuild.build({
}, },
entryPoints: ['main.ts'], entryPoints: ['main.ts'],
bundle: true, bundle: true,
external: ['obsidian', 'electron', ...builtins], external: [
'obsidian',
'electron',
'@codemirror/autocomplete',
'@codemirror/closebrackets',
'@codemirror/collab',
'@codemirror/commands',
'@codemirror/comment',
'@codemirror/fold',
'@codemirror/gutter',
'@codemirror/highlight',
'@codemirror/history',
'@codemirror/language',
'@codemirror/lint',
'@codemirror/matchbrackets',
'@codemirror/panel',
'@codemirror/rangeset',
'@codemirror/rectangular-selection',
'@codemirror/search',
'@codemirror/state',
'@codemirror/stream-parser',
'@codemirror/text',
'@codemirror/tooltip',
'@codemirror/view',
...builtins],
format: 'cjs', format: 'cjs',
watch: !prod, watch: !prod,
target: 'es2016', target: 'es2016',