unplugin-oxc 0.2.4 → 0.2.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.js +1 -1
- package/dist/farm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/rolldown.js +1 -1
- package/dist/rollup.js +1 -1
- package/dist/rspack.js +1 -1
- package/dist/{src-ByY2eXwv.js → src-DlAKtjQu.js} +4 -3
- package/dist/unloader.js +1 -1
- package/dist/vite.js +1 -1
- package/dist/webpack.js +1 -1
- package/package.json +20 -15
package/dist/esbuild.js
CHANGED
package/dist/farm.js
CHANGED
package/dist/index.js
CHANGED
package/dist/rolldown.js
CHANGED
package/dist/rollup.js
CHANGED
package/dist/rspack.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { readFile } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import process from "node:process";
|
|
4
|
-
import { minify } from "oxc-minify";
|
|
5
4
|
import { ResolverFactory } from "oxc-resolver";
|
|
6
5
|
import { transform } from "oxc-transform";
|
|
7
6
|
import { createUnplugin } from "unplugin";
|
|
@@ -26,7 +25,8 @@ function resolveOptions(options, framework) {
|
|
|
26
25
|
const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
27
26
|
const options = resolveOptions(rawOptions, framework);
|
|
28
27
|
const filter = createFilter(options.include, options.exclude);
|
|
29
|
-
const renderChunk = options.minify !== false ? (code, chunk) => {
|
|
28
|
+
const renderChunk = options.minify !== false ? async (code, chunk) => {
|
|
29
|
+
const { minify } = await import("oxc-minify");
|
|
30
30
|
const result = minify(chunk.fileName, code, {
|
|
31
31
|
...options.minify === true ? {} : options.minify,
|
|
32
32
|
sourcemap: options.sourcemap
|
|
@@ -65,7 +65,8 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
|
|
|
65
65
|
const resolved = await resolver.async(directory, id);
|
|
66
66
|
if (resolved.error?.startsWith("Builtin module")) return {
|
|
67
67
|
id,
|
|
68
|
-
external: true
|
|
68
|
+
external: true,
|
|
69
|
+
moduleSideEffects: false
|
|
69
70
|
};
|
|
70
71
|
if (resolved.path) return resolved.path;
|
|
71
72
|
} : undefined,
|
package/dist/unloader.js
CHANGED
package/dist/vite.js
CHANGED
package/dist/webpack.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "unplugin-oxc",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Oxc integration for unplugin.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -57,29 +57,34 @@
|
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"unloader": "*"
|
|
59
59
|
},
|
|
60
|
+
"peerDependenciesMeta": {
|
|
61
|
+
"unloader": {
|
|
62
|
+
"optional": true
|
|
63
|
+
}
|
|
64
|
+
},
|
|
60
65
|
"dependencies": {
|
|
61
|
-
"oxc-minify": "^0.
|
|
62
|
-
"oxc-resolver": "^4.
|
|
63
|
-
"oxc-transform": "^0.
|
|
66
|
+
"oxc-minify": "^0.54.0",
|
|
67
|
+
"oxc-resolver": "^4.2.0",
|
|
68
|
+
"oxc-transform": "^0.54.0",
|
|
64
69
|
"unplugin": "^2.2.0",
|
|
65
70
|
"unplugin-utils": "^0.2.4"
|
|
66
71
|
},
|
|
67
72
|
"devDependencies": {
|
|
68
|
-
"@sxzz/eslint-config": "^5.0
|
|
69
|
-
"@sxzz/prettier-config": "^2.
|
|
73
|
+
"@sxzz/eslint-config": "^5.2.0",
|
|
74
|
+
"@sxzz/prettier-config": "^2.2.0",
|
|
70
75
|
"@sxzz/test-utils": "^0.5.1",
|
|
71
|
-
"@types/node": "^22.13.
|
|
76
|
+
"@types/node": "^22.13.9",
|
|
72
77
|
"bumpp": "^10.0.3",
|
|
73
|
-
"eslint": "^9.
|
|
74
|
-
"prettier": "^3.5.
|
|
75
|
-
"rollup": "^4.34.
|
|
78
|
+
"eslint": "^9.21.0",
|
|
79
|
+
"prettier": "^3.5.3",
|
|
80
|
+
"rollup": "^4.34.9",
|
|
76
81
|
"tinyexec": "^0.3.2",
|
|
77
|
-
"tsdown": "^0.
|
|
78
|
-
"tsx": "^4.19.
|
|
79
|
-
"typescript": "^5.
|
|
82
|
+
"tsdown": "^0.6.2",
|
|
83
|
+
"tsx": "^4.19.3",
|
|
84
|
+
"typescript": "^5.8.2",
|
|
80
85
|
"unloader": "^0.3.0",
|
|
81
|
-
"vite": "^6.
|
|
82
|
-
"vitest": "^3.0.
|
|
86
|
+
"vite": "^6.2.0",
|
|
87
|
+
"vitest": "^3.0.7"
|
|
83
88
|
},
|
|
84
89
|
"engines": {
|
|
85
90
|
"node": ">=18.12.0"
|