Update build script to include external node packages.
This commit is contained in:
parent
6fdd374cb8
commit
db18a36e65
3 changed files with 24 additions and 20 deletions
|
@ -1,10 +1,11 @@
|
|||
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 visit the plugins github repository
|
||||
if you want to view the source, please visit the github repository of this plugin
|
||||
*/
|
||||
`;
|
||||
|
||||
|
@ -16,7 +17,7 @@ esbuild.build({
|
|||
},
|
||||
entryPoints: ['main.ts'],
|
||||
bundle: true,
|
||||
external: ['obsidian'],
|
||||
external: ['obsidian', 'electron', ...builtins],
|
||||
format: 'cjs',
|
||||
watch: !prod,
|
||||
target: 'es2016',
|
||||
|
|
2
main.ts
2
main.ts
|
@ -1,5 +1,7 @@
|
|||
import { App, Editor, MarkdownView, Modal, Notice, Plugin, PluginSettingTab, Setting } from 'obsidian';
|
||||
|
||||
// Remember to rename these classes and interfaces!
|
||||
|
||||
interface MyPluginSettings {
|
||||
mySetting: string;
|
||||
}
|
||||
|
|
11
package.json
11
package.json
|
@ -11,12 +11,13 @@
|
|||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/node": "^16.11.1",
|
||||
"esbuild": "0.13.11",
|
||||
"@types/node": "^16.11.6",
|
||||
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
||||
"@typescript-eslint/parser": "^5.2.0",
|
||||
"builtin-modules": "^3.2.0",
|
||||
"esbuild": "0.13.12",
|
||||
"obsidian": "^0.12.17",
|
||||
"tslib": "2.3.1",
|
||||
"typescript": "4.4.4",
|
||||
"@typescript-eslint/eslint-plugin": "^5.2.0",
|
||||
"@typescript-eslint/parser": "^5.2.0"
|
||||
"typescript": "4.4.4"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue