@askrjs/vite 0.4.1 → 0.4.2
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 +22 -2
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -11,12 +11,30 @@ framework's JSX and template conventions inside a normal Vite app.
|
|
|
11
11
|
## Install
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
npm install -D @askrjs/vite vite
|
|
14
|
+
npm install -D @askrjs/vite vite@8.2.2
|
|
15
15
|
# or
|
|
16
|
-
npm install -D @askrjs/vite vite-plus
|
|
16
|
+
npm install -D @askrjs/vite vite-plus@1.1.0 vite@npm:@voidzero-dev/vite-plus-core@1.1.0
|
|
17
17
|
npm install @askrjs/askr
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
Use `@askrjs/vite@0.4.2` or newer for these peer ranges. The
|
|
21
|
+
[minimal Vite+ starter](examples/vite-plus/README.md) uses a packed artifact from
|
|
22
|
+
this checkout.
|
|
23
|
+
|
|
24
|
+
The installed-package browser suite qualifies this matrix:
|
|
25
|
+
|
|
26
|
+
| Toolchain | `vite` dependency | Configuration import |
|
|
27
|
+
| ----------- | ---------------------------------------- | -------------------- |
|
|
28
|
+
| Vite 8.2.2 | `vite@8.2.2` | `vite` |
|
|
29
|
+
| Vite+ 0.3.1 | `npm:@voidzero-dev/vite-plus-core@0.3.1` | `vite-plus` |
|
|
30
|
+
| Vite+ 1.1.0 | `npm:@voidzero-dev/vite-plus-core@1.1.0` | `vite-plus` |
|
|
31
|
+
|
|
32
|
+
Each consumer installs normally with matching peers and exercises JSX, browser
|
|
33
|
+
HMR without a document reload, server document composition, production client
|
|
34
|
+
and server builds, and responsive-image generation. Image declarations require
|
|
35
|
+
a production build; image processing during development is not supported.
|
|
36
|
+
The low versions in the `vite` peer range describe Vite+ core aliases.
|
|
37
|
+
|
|
20
38
|
## Use
|
|
21
39
|
|
|
22
40
|
```ts
|
|
@@ -29,6 +47,8 @@ export default defineConfig({
|
|
|
29
47
|
});
|
|
30
48
|
```
|
|
31
49
|
|
|
50
|
+
For Vite+, import `defineConfig` from `vite-plus` and use `vp dev` and `vp build`.
|
|
51
|
+
|
|
32
52
|
`askr({ optimizeTemplates: true })` optionally hoists repeated static
|
|
33
53
|
`class`, `className`, and `style` literals from parsed JSX-runtime property
|
|
34
54
|
nodes. The optimizer never scans or rewrites unrelated strings, template
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@askrjs/vite",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Vite plugin for Askr JSX and template transforms",
|
|
5
5
|
"homepage": "https://github.com/askrjs/askr-vite#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -47,8 +47,9 @@
|
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "vp pack",
|
|
49
49
|
"dev": "vp pack --watch",
|
|
50
|
-
"test": "npm run test:unit",
|
|
50
|
+
"test": "npm run test:unit && npm run test:browser",
|
|
51
51
|
"test:unit": "vp test run -c vitest.config.ts",
|
|
52
|
+
"test:browser": "npm run build && playwright test",
|
|
52
53
|
"test:publint": "publint",
|
|
53
54
|
"fmt": "vp fmt .",
|
|
54
55
|
"lint": "vp lint .",
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
"devDependencies": {
|
|
67
68
|
"@askrjs/askr": ">=0.4.0 <0.5.0",
|
|
68
69
|
"@askrjs/server": ">=0.4.0 <0.5.0",
|
|
70
|
+
"@playwright/test": "1.63.0",
|
|
69
71
|
"@types/node": "^26.3.0",
|
|
70
72
|
"publint": "^0.3.24",
|
|
71
73
|
"sharp": "^0.35.3",
|
|
@@ -77,8 +79,8 @@
|
|
|
77
79
|
"peerDependencies": {
|
|
78
80
|
"@askrjs/askr": ">=0.4.0 <0.5.0",
|
|
79
81
|
"sharp": "^0.35.3",
|
|
80
|
-
"vite": "^8.2.2",
|
|
81
|
-
"vite-plus": "^0.3.1"
|
|
82
|
+
"vite": "^8.2.2 || ^0.3.1 || ^1.1.0",
|
|
83
|
+
"vite-plus": "^0.3.1 || ^1.1.0"
|
|
82
84
|
},
|
|
83
85
|
"peerDependenciesMeta": {
|
|
84
86
|
"sharp": {
|