Mercurial > obsidian-remember-file-state
view esbuild.config.mjs @ 17:cd843e1c201b
Added tag 1.0.4 for changeset a50ef39473b6
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 12 Mar 2022 12:04:11 -0800 |
parents | 7975d7c73f8a |
children | 2a9e941c96ee |
line wrap: on
line source
import esbuild from "esbuild"; import process from "process"; import builtins from 'builtin-modules' 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', '@codemirror/state', '@codemirror/view', ...builtins ], format: 'cjs', watch: !prod, target: 'es2016', logLevel: "info", sourcemap: prod ? false : 'inline', treeShaking: true, outfile: 'main.js', }).catch(() => process.exit(1));