unplugin-oxc 0.2.2 → 0.2.3

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-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.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-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.js";
2
2
 
3
3
  //#region src/farm.ts
4
4
  /**
package/dist/index.d.ts CHANGED
@@ -31,7 +31,7 @@ interface Options {
31
31
  /**
32
32
  * Minify options passed to `oxc-minify`
33
33
  */
34
- minify?: Omit<MinifyOptions, "sourcemap"> | false;
34
+ minify?: Omit<MinifyOptions, "sourcemap"> | boolean;
35
35
  /**
36
36
  * Default: `true` on unloader, `false` on others.
37
37
  */
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import { Oxc } from "./src-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.js";
2
2
 
3
3
  export { Oxc };
package/dist/rolldown.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.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-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.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-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.js";
2
2
 
3
3
  //#region src/rspack.ts
4
4
  /**
@@ -27,7 +27,7 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
27
27
  const filter = createFilter(options.include, options.exclude);
28
28
  const renderChunk = options.minify !== false ? (code, chunk) => {
29
29
  const result = minify(chunk.fileName, code, {
30
- ...options.minify,
30
+ ...options.minify === true ? {} : options.minify,
31
31
  sourcemap: options.sourcemap
32
32
  });
33
33
  return {
@@ -62,6 +62,10 @@ const Oxc = createUnplugin((rawOptions = {}, { framework }) => {
62
62
  });
63
63
  const directory = path.dirname(importer || id);
64
64
  const resolved = await resolver.async(directory, id);
65
+ if (resolved.error?.startsWith("Builtin module")) return {
66
+ id,
67
+ external: true
68
+ };
65
69
  if (resolved.path) return resolved.path;
66
70
  } : undefined,
67
71
  transformInclude(id) {
package/dist/unloader.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Oxc } from "./src-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.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-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.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-Ctwdi8QE.js";
1
+ import { Oxc } from "./src-CFVXTEFR.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.2",
3
+ "version": "0.2.3",
4
4
  "description": "Oxc integration for unplugin.",
5
5
  "type": "module",
6
6
  "keywords": [