unplugin-oxc 0.2.3 → 0.2.5

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 CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/esbuild.ts
4
4
  /**
package/dist/farm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/farm.ts
4
4
  /**
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  export { Oxc };
package/dist/rolldown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/rolldown.ts
4
4
  /**
package/dist/rollup.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/rollup.ts
4
4
  /**
package/dist/rspack.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/rspack.ts
4
4
  /**
@@ -1,6 +1,6 @@
1
1
  import { readFile } from "node:fs/promises";
2
2
  import path from "node:path";
3
- import { minify } from "oxc-minify";
3
+ import process from "node:process";
4
4
  import { ResolverFactory } from "oxc-resolver";
5
5
  import { transform } from "oxc-transform";
6
6
  import { createUnplugin } from "unplugin";
@@ -25,7 +25,8 @@ function resolveOptions(options, framework) {
25
25
  const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
26
26
  const options = resolveOptions(rawOptions, framework);
27
27
  const filter = createFilter(options.include, options.exclude);
28
- const renderChunk = options.minify !== false ? (code, chunk) => {
28
+ const renderChunk = options.minify !== false ? async (code, chunk) => {
29
+ const { minify } = await import("oxc-minify");
29
30
  const result = minify(chunk.fileName, code, {
30
31
  ...options.minify === true ? {} : options.minify,
31
32
  sourcemap: options.sourcemap
@@ -60,11 +61,12 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
60
61
  builtinModules: true,
61
62
  ...options.resolve
62
63
  });
63
- const directory = path.dirname(importer || id);
64
+ const directory = importer ? path.dirname(importer) : process.cwd();
64
65
  const resolved = await resolver.async(directory, id);
65
66
  if (resolved.error?.startsWith("Builtin module")) return {
66
67
  id,
67
- external: true
68
+ external: true,
69
+ moduleSideEffects: false
68
70
  };
69
71
  if (resolved.path) return resolved.path;
70
72
  } : undefined,
package/dist/unloader.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/unloader.ts
4
4
  /**
package/dist/vite.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/vite.ts
4
4
  /**
package/dist/webpack.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-CFVXTEFR.js";
1
+ import { Oxc } from "./src-DlAKtjQu.js";
2
2
 
3
3
  //#region src/webpack.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-oxc",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Oxc integration for unplugin.",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -58,27 +58,28 @@
58
58
  "unloader": "*"
59
59
  },
60
60
  "dependencies": {
61
- "oxc-minify": "^0.50.0",
62
- "oxc-resolver": "^4.0.0",
63
- "oxc-transform": "^0.50.0",
61
+ "oxc-minify": "^0.53.0",
62
+ "oxc-resolver": "^4.2.0",
63
+ "oxc-transform": "^0.53.0",
64
64
  "unplugin": "^2.2.0",
65
65
  "unplugin-utils": "^0.2.4"
66
66
  },
67
67
  "devDependencies": {
68
- "@sxzz/eslint-config": "^5.0.2",
69
- "@sxzz/prettier-config": "^2.1.2",
68
+ "@sxzz/eslint-config": "^5.1.1",
69
+ "@sxzz/prettier-config": "^2.2.0",
70
70
  "@sxzz/test-utils": "^0.5.1",
71
- "@types/node": "^22.13.1",
71
+ "@types/node": "^22.13.8",
72
72
  "bumpp": "^10.0.3",
73
- "eslint": "^9.20.1",
74
- "prettier": "^3.5.0",
75
- "rollup": "^4.34.6",
76
- "tsdown": "^0.5.9",
77
- "tsx": "^4.19.2",
78
- "typescript": "^5.7.3",
73
+ "eslint": "^9.21.0",
74
+ "prettier": "^3.5.2",
75
+ "rollup": "^4.34.9",
76
+ "tinyexec": "^0.3.2",
77
+ "tsdown": "^0.6.0",
78
+ "tsx": "^4.19.3",
79
+ "typescript": "^5.8.2",
79
80
  "unloader": "^0.3.0",
80
- "vite": "^6.1.0",
81
- "vitest": "^3.0.5"
81
+ "vite": "^6.2.0",
82
+ "vitest": "^3.0.7"
82
83
  },
83
84
  "engines": {
84
85
  "node": ">=18.12.0"