forked from quoid/userscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-app.js
More file actions
37 lines (34 loc) · 970 Bytes
/
Copy pathbuild-app.js
File metadata and controls
37 lines (34 loc) · 970 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
33
34
35
36
37
/**
* @file Build App WebView resources using the Vite JavaScript API
* @see {@link https://vitejs.dev/guide/api-javascript.html JavaScript API}
*
* All build processes start at the same time due to asynchronous calls
* The assets name is irrelevant, just need to determine the entry path
*/
import { build } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
/**
* Define default vite config options
* Disable auto resolving {@link vite.config.js}
* @see {@link https://vitejs.dev/config/ Config}
* @see {@link https://vitejs.dev/guide/api-javascript.html#inlineconfig configFile}
* @type {import("vite").InlineConfig}
*/
const defineConfig = {
base: "./",
configFile: false,
};
/**
* Build App-Shared WebView resources to xcode dist
*/
build({
...defineConfig,
plugins: [svelte()],
build: {
outDir: "xcode/App-Shared/Resources/dist/",
copyPublicDir: false,
rollupOptions: {
input: "entry-app-webview.html",
},
},
});