@vantail/vite 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @vantail/vite
|
|
2
|
+
|
|
3
|
+
The Vite plugin for [Vantail](https://github.com/Vantail/vantail).
|
|
4
|
+
|
|
5
|
+
You do not usually add this yourself. `@vantail/cli` applies it for you, and
|
|
6
|
+
`vantail dev` and `vantail build` are the commands you run.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
npm create @vantail my-app
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What it does
|
|
13
|
+
|
|
14
|
+
It sets the handful of things a Vite project needs in order to be loaded by a
|
|
15
|
+
native webview rather than a browser:
|
|
16
|
+
|
|
17
|
+
- relative asset paths, because a packaged application is served from a
|
|
18
|
+
`vantail://` protocol rather than from a web root
|
|
19
|
+
- a build target matching the webview each platform actually has, so output is
|
|
20
|
+
not transpiled further than it needs to be
|
|
21
|
+
- the dev server settings `vantail dev` expects when it points a real window
|
|
22
|
+
at it
|
|
23
|
+
|
|
24
|
+
## Using it directly
|
|
25
|
+
|
|
26
|
+
Only necessary if you are composing your own Vite config rather than letting
|
|
27
|
+
the CLI do it:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import { defineConfig } from "vite";
|
|
31
|
+
import { vantail } from "@vantail/vite";
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
plugins: [vantail()],
|
|
35
|
+
});
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
MIT licensed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vantail/vite",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Vite plugin for Vantail applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@vantail/shared": "^0.1.
|
|
27
|
+
"@vantail/shared": "^0.1.1"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0"
|