forked from quoid/userscripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpreview-app.js
More file actions
35 lines (32 loc) · 826 Bytes
/
Copy pathpreview-app.js
File metadata and controls
35 lines (32 loc) · 826 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
/**
* @file Preview App WebView resources using the Vite JavaScript API
* @see {@link https://vitejs.dev/guide/api-javascript.html JavaScript API}
*/
import { preview } from "vite";
/**
* 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,
};
/**
* Preview App-Shared WebView resources from xcode dist
*/
(async () => {
const previewServer = await preview({
...defineConfig,
preview: {
// port: 4173,
open: "entry-app-webview.html",
},
build: {
outDir: "xcode/App-Shared/Resources/dist/",
},
});
previewServer.printUrls();
})();