unplugin-oxc 0.5.4 → 0.5.6
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/esbuild.mjs +1 -1
- package/dist/farm.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/rolldown.mjs +1 -1
- package/dist/rollup.mjs +1 -1
- package/dist/rspack.mjs +1 -1
- package/dist/{src-Cwmf7KjW.mjs → src-CC29LGxl.mjs} +6 -6
- package/dist/unloader.mjs +1 -1
- package/dist/vite.mjs +1 -1
- package/dist/webpack.mjs +1 -1
- package/package.json +38 -39
package/dist/esbuild.mjs
CHANGED
package/dist/farm.mjs
CHANGED
package/dist/index.mjs
CHANGED
package/dist/rolldown.mjs
CHANGED
package/dist/rollup.mjs
CHANGED
package/dist/rspack.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import { ResolverFactory } from "oxc-resolver";
|
|
5
|
-
import {
|
|
5
|
+
import { transformSync } from "oxc-transform";
|
|
6
6
|
import { createUnplugin } from "unplugin";
|
|
7
7
|
|
|
8
8
|
//#region node_modules/.pnpm/@antfu+utils@9.3.0/node_modules/@antfu/utils/dist/index.mjs
|
|
@@ -82,9 +82,9 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
|
82
82
|
};
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
const transform
|
|
85
|
+
const transform = options.transform === false ? void 0 : (code, id, ...args) => {
|
|
86
86
|
const [transformOptions] = args;
|
|
87
|
-
const result =
|
|
87
|
+
const result = transformSync(id, code, {
|
|
88
88
|
...options.transform,
|
|
89
89
|
sourceType: guessSourceType(id, transformOptions?.format),
|
|
90
90
|
sourcemap: options.sourcemap
|
|
@@ -97,7 +97,7 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
|
97
97
|
};
|
|
98
98
|
const renderChunk = options.minify === false ? void 0 : async (code, chunk) => {
|
|
99
99
|
const { minify } = await import("oxc-minify");
|
|
100
|
-
const result = minify(chunk.fileName, code, {
|
|
100
|
+
const result = await minify(chunk.fileName, code, {
|
|
101
101
|
...options.minify === true ? {} : options.minify,
|
|
102
102
|
sourcemap: options.sourcemap
|
|
103
103
|
});
|
|
@@ -138,12 +138,12 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
|
138
138
|
name: "unplugin-oxc",
|
|
139
139
|
enforce: options.enforce,
|
|
140
140
|
resolveId,
|
|
141
|
-
transform: transform
|
|
141
|
+
transform: transform ? {
|
|
142
142
|
filter: { id: {
|
|
143
143
|
include: options.include,
|
|
144
144
|
exclude: options.exclude
|
|
145
145
|
} },
|
|
146
|
-
handler: transform
|
|
146
|
+
handler: transform
|
|
147
147
|
} : void 0,
|
|
148
148
|
rollup: { renderChunk },
|
|
149
149
|
rolldown: { renderChunk },
|
package/dist/unloader.mjs
CHANGED
package/dist/vite.mjs
CHANGED
package/dist/webpack.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-oxc",
|
|
3
|
-
"version": "0.5.4",
|
|
4
|
-
"description": "Oxc integration for unplugin.",
|
|
5
3
|
"type": "module",
|
|
4
|
+
"version": "0.5.6",
|
|
5
|
+
"description": "Oxc integration for unplugin.",
|
|
6
|
+
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"funding": "https://github.com/sponsors/sxzz",
|
|
9
|
+
"homepage": "https://github.com/unplugin/unplugin-oxc#readme",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/unplugin/unplugin-oxc.git"
|
|
13
|
+
},
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/unplugin/unplugin-oxc/issues"
|
|
16
|
+
},
|
|
6
17
|
"keywords": [
|
|
7
18
|
"unplugin",
|
|
8
19
|
"vite",
|
|
@@ -13,23 +24,6 @@
|
|
|
13
24
|
"esbuild",
|
|
14
25
|
"farm"
|
|
15
26
|
],
|
|
16
|
-
"license": "MIT",
|
|
17
|
-
"homepage": "https://github.com/unplugin/unplugin-oxc#readme",
|
|
18
|
-
"bugs": {
|
|
19
|
-
"url": "https://github.com/unplugin/unplugin-oxc/issues"
|
|
20
|
-
},
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "git+https://github.com/unplugin/unplugin-oxc.git"
|
|
24
|
-
},
|
|
25
|
-
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
26
|
-
"funding": "https://github.com/sponsors/sxzz",
|
|
27
|
-
"files": [
|
|
28
|
-
"dist"
|
|
29
|
-
],
|
|
30
|
-
"main": "./dist/index.mjs",
|
|
31
|
-
"module": "./dist/index.mjs",
|
|
32
|
-
"types": "./dist/index.d.mts",
|
|
33
27
|
"exports": {
|
|
34
28
|
".": "./dist/index.mjs",
|
|
35
29
|
"./api": "./dist/api.mjs",
|
|
@@ -43,6 +37,9 @@
|
|
|
43
37
|
"./webpack": "./dist/webpack.mjs",
|
|
44
38
|
"./package.json": "./package.json"
|
|
45
39
|
},
|
|
40
|
+
"main": "./dist/index.mjs",
|
|
41
|
+
"module": "./dist/index.mjs",
|
|
42
|
+
"types": "./dist/index.d.mts",
|
|
46
43
|
"typesVersions": {
|
|
47
44
|
"*": {
|
|
48
45
|
"*": [
|
|
@@ -51,9 +48,15 @@
|
|
|
51
48
|
]
|
|
52
49
|
}
|
|
53
50
|
},
|
|
51
|
+
"files": [
|
|
52
|
+
"dist"
|
|
53
|
+
],
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.19.0"
|
|
59
|
+
},
|
|
57
60
|
"peerDependencies": {
|
|
58
61
|
"unloader": "*"
|
|
59
62
|
},
|
|
@@ -63,31 +66,27 @@
|
|
|
63
66
|
}
|
|
64
67
|
},
|
|
65
68
|
"dependencies": {
|
|
66
|
-
"oxc-minify": ">=0.
|
|
67
|
-
"oxc-resolver": "^11.
|
|
68
|
-
"oxc-transform": ">=0.
|
|
69
|
-
"unplugin": "^2.3.
|
|
69
|
+
"oxc-minify": ">=0.102.0",
|
|
70
|
+
"oxc-resolver": "^11.15.0",
|
|
71
|
+
"oxc-transform": ">=0.102.0",
|
|
72
|
+
"unplugin": "^2.3.11"
|
|
70
73
|
},
|
|
71
74
|
"devDependencies": {
|
|
72
75
|
"@antfu/utils": "^9.3.0",
|
|
73
|
-
"@sxzz/eslint-config": "^7.
|
|
74
|
-
"@sxzz/prettier-config": "^2.2.
|
|
75
|
-
"@sxzz/test-utils": "^0.5.
|
|
76
|
-
"@types/node": "^
|
|
77
|
-
"bumpp": "^10.3.
|
|
78
|
-
"eslint": "^9.39.
|
|
79
|
-
"prettier": "^3.
|
|
80
|
-
"rollup": "^4.53.
|
|
76
|
+
"@sxzz/eslint-config": "^7.4.1",
|
|
77
|
+
"@sxzz/prettier-config": "^2.2.6",
|
|
78
|
+
"@sxzz/test-utils": "^0.5.14",
|
|
79
|
+
"@types/node": "^25.0.2",
|
|
80
|
+
"bumpp": "^10.3.2",
|
|
81
|
+
"eslint": "^9.39.2",
|
|
82
|
+
"prettier": "^3.7.4",
|
|
83
|
+
"rollup": "^4.53.3",
|
|
81
84
|
"tinyexec": "^1.0.2",
|
|
82
|
-
"tsdown": "^0.
|
|
83
|
-
"tsx": "^4.20.6",
|
|
85
|
+
"tsdown": "^0.17.4",
|
|
84
86
|
"typescript": "^5.9.3",
|
|
85
|
-
"unloader": "^0.8.
|
|
86
|
-
"vite": "^7.2.
|
|
87
|
-
"vitest": "^4.0.
|
|
88
|
-
},
|
|
89
|
-
"engines": {
|
|
90
|
-
"node": ">=20.19.0"
|
|
87
|
+
"unloader": "^0.8.2",
|
|
88
|
+
"vite": "^7.2.7",
|
|
89
|
+
"vitest": "^4.0.15"
|
|
91
90
|
},
|
|
92
91
|
"prettier": "@sxzz/prettier-config",
|
|
93
92
|
"scripts": {
|