@vizejs/vite-plugin 0.0.1-alpha.77 → 0.0.1-alpha.78
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/dist/index.js +11 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { transformWithOxc } from "vite";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import fs from "node:fs";
|
|
3
4
|
import { glob } from "tinyglobby";
|
|
@@ -475,6 +476,16 @@ function vize(options = {}) {
|
|
|
475
476
|
}
|
|
476
477
|
return null;
|
|
477
478
|
},
|
|
479
|
+
async transform(code, id) {
|
|
480
|
+
if (id.startsWith(VIRTUAL_PREFIX) && id.endsWith(".ts")) {
|
|
481
|
+
const result = await transformWithOxc(code, id.slice(VIRTUAL_PREFIX.length), { lang: "ts" });
|
|
482
|
+
return {
|
|
483
|
+
code: result.code,
|
|
484
|
+
map: result.map
|
|
485
|
+
};
|
|
486
|
+
}
|
|
487
|
+
return null;
|
|
488
|
+
},
|
|
478
489
|
async handleHotUpdate(ctx) {
|
|
479
490
|
const { file, server: server$1, read } = ctx;
|
|
480
491
|
if (file.endsWith(".vue") && filter(file)) try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizejs/vite-plugin",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.78",
|
|
4
4
|
"description": "High-performance native Vite plugin for Vue SFC compilation powered by Vize",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"provenance": true,
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"tinyglobby": "^0.2.0",
|
|
47
|
-
"@vizejs/native": "0.0.1-alpha.
|
|
47
|
+
"@vizejs/native": "0.0.1-alpha.78"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsdown",
|