-
-
Notifications
You must be signed in to change notification settings - Fork 325
Expand file tree
/
Copy pathesbuild.js
More file actions
32 lines (30 loc) · 901 Bytes
/
Copy pathesbuild.js
File metadata and controls
32 lines (30 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import esbuild from 'esbuild';
import path from 'path';
import { build_plugin } from 'obsidian-smart-env/build/build_plugin.js';
import { build_smart_env_config } from 'obsidian-smart-env/build/build_env_config.js';
import { create_banner } from './src/utils/banner.js';
const roots = [
path.resolve(process.cwd(), 'src'),
];
build_plugin({
esbuild,
build_banner: create_banner,
entry_point: 'src/main.js',
entry_point_from_argv: true,
env_config_builder: build_smart_env_config,
env_config_output_dir: process.cwd(),
env_config_roots: roots,
external: [
'@codemirror/state',
'@codemirror/view',
'@xenova/transformers',
'@huggingface/transformers',
'http',
'url',
],
plugin_id: 'smart-connections',
styles_path: path.join(process.cwd(), 'src', 'styles.css'),
}).catch((err) => {
console.error('Error in build process:', err);
process.exit(1);
});