vite-node 0.13.1 → 0.14.2

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.
@@ -6,7 +6,7 @@ var vm = require('vm');
6
6
  var pathe = require('pathe');
7
7
  var mlly = require('mlly');
8
8
  var createDebug = require('debug');
9
- var utils = require('./utils-c2e3d5fd.js');
9
+ var utils = require('./chunk-utils.cjs');
10
10
 
11
11
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
12
 
@@ -4,7 +4,7 @@ import vm from 'vm';
4
4
  import { resolve, dirname, isAbsolute, extname } from 'pathe';
5
5
  import { isNodeBuiltin } from 'mlly';
6
6
  import createDebug from 'debug';
7
- import { n as normalizeModuleId, s as slash, a as normalizeRequestId, t as toFilePath, i as isPrimitive, m as mergeSlashes } from './utils-b4f03380.js';
7
+ import { n as normalizeModuleId, s as slash, b as normalizeRequestId, a as toFilePath, i as isPrimitive, m as mergeSlashes } from './chunk-utils.mjs';
8
8
 
9
9
  const debugExecute = createDebug("vite-node:client:execute");
10
10
  const debugNative = createDebug("vite-node:client:native");
@@ -4,7 +4,7 @@ var pathe = require('pathe');
4
4
  var createDebug = require('debug');
5
5
  var fs = require('fs');
6
6
  var mlly = require('mlly');
7
- var utils = require('./utils-c2e3d5fd.js');
7
+ var utils = require('./chunk-utils.cjs');
8
8
 
9
9
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
10
 
@@ -71,8 +71,10 @@ async function _shouldExternalize(id, options) {
71
71
  return false;
72
72
  }
73
73
  function matchExternalizePattern(id, patterns) {
74
- if (!patterns)
74
+ if (patterns == null)
75
75
  return false;
76
+ if (patterns === true)
77
+ return true;
76
78
  for (const ex of patterns) {
77
79
  if (typeof ex === "string") {
78
80
  if (id.includes(`/node_modules/${ex}/`))
@@ -121,6 +123,17 @@ class ViteNodeServer {
121
123
  this.fetchPromiseMap = /* @__PURE__ */ new Map();
122
124
  this.transformPromiseMap = /* @__PURE__ */ new Map();
123
125
  this.fetchCache = /* @__PURE__ */ new Map();
126
+ var _a, _b;
127
+ const ssrOptions = server.config.ssr;
128
+ if (ssrOptions) {
129
+ options.deps ?? (options.deps = {});
130
+ if (ssrOptions.noExternal === true) {
131
+ (_a = options.deps).inline ?? (_a.inline = true);
132
+ } else if (options.deps.inline !== true) {
133
+ (_b = options.deps).inline ?? (_b.inline = []);
134
+ options.deps.inline.push(...utils.toArray(ssrOptions.noExternal));
135
+ }
136
+ }
124
137
  }
125
138
  shouldExternalize(id) {
126
139
  return shouldExternalize(id, this.options.deps);
@@ -2,7 +2,7 @@ import { join } from 'pathe';
2
2
  import createDebug from 'debug';
3
3
  import { existsSync } from 'fs';
4
4
  import { isNodeBuiltin, isValidNodeImport } from 'mlly';
5
- import { s as slash, t as toFilePath, w as withInlineSourcemap } from './utils-b4f03380.js';
5
+ import { s as slash, t as toArray, a as toFilePath, w as withInlineSourcemap } from './chunk-utils.mjs';
6
6
 
7
7
  const ESM_EXT_RE = /\.(es|esm|esm-browser|esm-bundler|es6|module)\.js$/;
8
8
  const ESM_FOLDER_RE = /\/esm\/(.*\.js)$/;
@@ -65,8 +65,10 @@ async function _shouldExternalize(id, options) {
65
65
  return false;
66
66
  }
67
67
  function matchExternalizePattern(id, patterns) {
68
- if (!patterns)
68
+ if (patterns == null)
69
69
  return false;
70
+ if (patterns === true)
71
+ return true;
70
72
  for (const ex of patterns) {
71
73
  if (typeof ex === "string") {
72
74
  if (id.includes(`/node_modules/${ex}/`))
@@ -115,6 +117,17 @@ class ViteNodeServer {
115
117
  this.fetchPromiseMap = /* @__PURE__ */ new Map();
116
118
  this.transformPromiseMap = /* @__PURE__ */ new Map();
117
119
  this.fetchCache = /* @__PURE__ */ new Map();
120
+ var _a, _b;
121
+ const ssrOptions = server.config.ssr;
122
+ if (ssrOptions) {
123
+ options.deps ?? (options.deps = {});
124
+ if (ssrOptions.noExternal === true) {
125
+ (_a = options.deps).inline ?? (_a.inline = true);
126
+ } else if (options.deps.inline !== true) {
127
+ (_b = options.deps).inline ?? (_b.inline = []);
128
+ options.deps.inline.push(...toArray(ssrOptions.noExternal));
129
+ }
130
+ }
118
131
  }
119
132
  shouldExternalize(id) {
120
133
  return shouldExternalize(id, this.options.deps);
@@ -40,6 +40,13 @@ async function withInlineSourcemap(result) {
40
40
  `;
41
41
  return result;
42
42
  }
43
+ function toArray(array) {
44
+ if (array === null || array === void 0)
45
+ array = [];
46
+ if (Array.isArray(array))
47
+ return array;
48
+ return [array];
49
+ }
43
50
 
44
51
  exports.isPrimitive = isPrimitive;
45
52
  exports.isWindows = isWindows;
@@ -47,5 +54,6 @@ exports.mergeSlashes = mergeSlashes;
47
54
  exports.normalizeModuleId = normalizeModuleId;
48
55
  exports.normalizeRequestId = normalizeRequestId;
49
56
  exports.slash = slash;
57
+ exports.toArray = toArray;
50
58
  exports.toFilePath = toFilePath;
51
59
  exports.withInlineSourcemap = withInlineSourcemap;
@@ -38,5 +38,12 @@ async function withInlineSourcemap(result) {
38
38
  `;
39
39
  return result;
40
40
  }
41
+ function toArray(array) {
42
+ if (array === null || array === void 0)
43
+ array = [];
44
+ if (Array.isArray(array))
45
+ return array;
46
+ return [array];
47
+ }
41
48
 
42
- export { normalizeRequestId as a, isWindows as b, isPrimitive as i, mergeSlashes as m, normalizeModuleId as n, slash as s, toFilePath as t, withInlineSourcemap as w };
49
+ export { toFilePath as a, normalizeRequestId as b, isWindows as c, isPrimitive as i, mergeSlashes as m, normalizeModuleId as n, slash as s, toArray as t, withInlineSourcemap as w };
package/dist/cli.cjs CHANGED
@@ -3,15 +3,15 @@
3
3
  var events = require('events');
4
4
  var kolorist = require('kolorist');
5
5
  var vite = require('vite');
6
- var server = require('./server-f6511dc4.js');
7
- var client = require('./client-f221b9b5.js');
6
+ var server = require('./chunk-server.cjs');
7
+ var client = require('./chunk-client.cjs');
8
+ var utils = require('./chunk-utils.cjs');
8
9
  require('pathe');
9
10
  require('debug');
10
11
  require('fs');
11
12
  require('mlly');
12
- require('./utils-c2e3d5fd.js');
13
- require('url');
14
13
  require('module');
14
+ require('url');
15
15
  require('vm');
16
16
 
17
17
  function toArr(any) {
@@ -627,7 +627,7 @@ class CAC extends events.EventEmitter {
627
627
 
628
628
  const cac = (name) => new CAC(name);
629
629
 
630
- var version = "0.13.1";
630
+ var version = "0.14.2";
631
631
 
632
632
  var __defProp = Object.defineProperty;
633
633
  var __defProps = Object.defineProperties;
@@ -693,19 +693,20 @@ async function run(files, options = {}) {
693
693
  });
694
694
  }
695
695
  function parseServerOptions(serverOptions) {
696
- var _a, _b, _c, _d, _e, _f, _g, _h;
696
+ var _a, _b, _c, _d, _e;
697
+ const inlineOptions = ((_a = serverOptions.deps) == null ? void 0 : _a.inline) === true ? true : utils.toArray((_b = serverOptions.deps) == null ? void 0 : _b.inline);
697
698
  return __spreadProps(__spreadValues({}, serverOptions), {
698
699
  deps: __spreadProps(__spreadValues({}, serverOptions.deps), {
699
- inline: (_b = (_a = serverOptions.deps) == null ? void 0 : _a.inline) == null ? void 0 : _b.map((dep) => {
700
+ inline: inlineOptions !== true ? inlineOptions.map((dep) => {
700
701
  return dep.startsWith("/") && dep.endsWith("/") ? new RegExp(dep) : dep;
701
- }),
702
- external: (_d = (_c = serverOptions.deps) == null ? void 0 : _c.external) == null ? void 0 : _d.map((dep) => {
702
+ }) : true,
703
+ external: utils.toArray((_c = serverOptions.deps) == null ? void 0 : _c.external).map((dep) => {
703
704
  return dep.startsWith("/") && dep.endsWith("/") ? new RegExp(dep) : dep;
704
705
  })
705
706
  }),
706
707
  transformMode: __spreadProps(__spreadValues({}, serverOptions.transformMode), {
707
- ssr: (_f = (_e = serverOptions.transformMode) == null ? void 0 : _e.ssr) == null ? void 0 : _f.map((dep) => new RegExp(dep)),
708
- web: (_h = (_g = serverOptions.transformMode) == null ? void 0 : _g.ssr) == null ? void 0 : _h.map((dep) => new RegExp(dep))
708
+ ssr: utils.toArray((_d = serverOptions.transformMode) == null ? void 0 : _d.ssr).map((dep) => new RegExp(dep)),
709
+ web: utils.toArray((_e = serverOptions.transformMode) == null ? void 0 : _e.web).map((dep) => new RegExp(dep))
709
710
  })
710
711
  });
711
712
  }
package/dist/cli.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as ViteNodeServerOptions } from './types-4b326db0.js';
1
+ import { e as ViteNodeServerOptions } from './types-93bdaf32.js';
2
2
 
3
3
  interface CliOptions {
4
4
  root?: string;
@@ -9,7 +9,7 @@ interface CliOptions {
9
9
  }
10
10
  declare type Optional<T> = T | undefined;
11
11
  declare type ComputeViteNodeServerOptionsCLI<T extends Record<string, any>> = {
12
- [K in keyof T]: T[K] extends Optional<RegExp[]> ? string[] : T[K] extends Optional<(string | RegExp)[]> ? string[] : T[K] extends Optional<Record<string, any>> ? ComputeViteNodeServerOptionsCLI<T[K]> : T[K];
12
+ [K in keyof T]: T[K] extends Optional<RegExp[]> ? string | string[] : T[K] extends Optional<(string | RegExp)[]> ? string | string[] : T[K] extends Optional<(string | RegExp)[] | true> ? string | string[] | true : T[K] extends Optional<Record<string, any>> ? ComputeViteNodeServerOptionsCLI<T[K]> : T[K];
13
13
  };
14
14
  declare type ViteNodeServerOptionsCLI = ComputeViteNodeServerOptionsCLI<ViteNodeServerOptions>;
15
15
 
@@ -1,15 +1,15 @@
1
1
  import { EventEmitter } from 'events';
2
2
  import { red, cyan, dim } from 'kolorist';
3
3
  import { createServer } from 'vite';
4
- import { V as ViteNodeServer } from './server-013a4491.js';
5
- import { V as ViteNodeRunner } from './client-3270fd45.js';
4
+ import { V as ViteNodeServer } from './chunk-server.mjs';
5
+ import { V as ViteNodeRunner } from './chunk-client.mjs';
6
+ import { t as toArray } from './chunk-utils.mjs';
6
7
  import 'pathe';
7
8
  import 'debug';
8
9
  import 'fs';
9
10
  import 'mlly';
10
- import './utils-b4f03380.js';
11
- import 'url';
12
11
  import 'module';
12
+ import 'url';
13
13
  import 'vm';
14
14
 
15
15
  function toArr(any) {
@@ -625,7 +625,7 @@ class CAC extends EventEmitter {
625
625
 
626
626
  const cac = (name) => new CAC(name);
627
627
 
628
- var version = "0.13.1";
628
+ var version = "0.14.2";
629
629
 
630
630
  var __defProp = Object.defineProperty;
631
631
  var __defProps = Object.defineProperties;
@@ -691,19 +691,20 @@ async function run(files, options = {}) {
691
691
  });
692
692
  }
693
693
  function parseServerOptions(serverOptions) {
694
- var _a, _b, _c, _d, _e, _f, _g, _h;
694
+ var _a, _b, _c, _d, _e;
695
+ const inlineOptions = ((_a = serverOptions.deps) == null ? void 0 : _a.inline) === true ? true : toArray((_b = serverOptions.deps) == null ? void 0 : _b.inline);
695
696
  return __spreadProps(__spreadValues({}, serverOptions), {
696
697
  deps: __spreadProps(__spreadValues({}, serverOptions.deps), {
697
- inline: (_b = (_a = serverOptions.deps) == null ? void 0 : _a.inline) == null ? void 0 : _b.map((dep) => {
698
+ inline: inlineOptions !== true ? inlineOptions.map((dep) => {
698
699
  return dep.startsWith("/") && dep.endsWith("/") ? new RegExp(dep) : dep;
699
- }),
700
- external: (_d = (_c = serverOptions.deps) == null ? void 0 : _c.external) == null ? void 0 : _d.map((dep) => {
700
+ }) : true,
701
+ external: toArray((_c = serverOptions.deps) == null ? void 0 : _c.external).map((dep) => {
701
702
  return dep.startsWith("/") && dep.endsWith("/") ? new RegExp(dep) : dep;
702
703
  })
703
704
  }),
704
705
  transformMode: __spreadProps(__spreadValues({}, serverOptions.transformMode), {
705
- ssr: (_f = (_e = serverOptions.transformMode) == null ? void 0 : _e.ssr) == null ? void 0 : _f.map((dep) => new RegExp(dep)),
706
- web: (_h = (_g = serverOptions.transformMode) == null ? void 0 : _g.ssr) == null ? void 0 : _h.map((dep) => new RegExp(dep))
706
+ ssr: toArray((_d = serverOptions.transformMode) == null ? void 0 : _d.ssr).map((dep) => new RegExp(dep)),
707
+ web: toArray((_e = serverOptions.transformMode) == null ? void 0 : _e.web).map((dep) => new RegExp(dep))
707
708
  })
708
709
  });
709
710
  }
package/dist/client.cjs CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var client = require('./client-f221b9b5.js');
5
+ var client = require('./chunk-client.cjs');
6
6
  require('module');
7
7
  require('url');
8
8
  require('vm');
9
9
  require('pathe');
10
10
  require('mlly');
11
11
  require('debug');
12
- require('./utils-c2e3d5fd.js');
12
+ require('./chunk-utils.cjs');
13
13
 
14
14
 
15
15
 
package/dist/client.d.ts CHANGED
@@ -1 +1 @@
1
- export { f as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, g as ViteNodeRunner } from './types-4b326db0.js';
1
+ export { f as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, g as ViteNodeRunner } from './types-93bdaf32.js';
@@ -1,8 +1,8 @@
1
- export { D as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, V as ViteNodeRunner } from './client-3270fd45.js';
1
+ export { D as DEFAULT_REQUEST_STUBS, M as ModuleCacheMap, V as ViteNodeRunner } from './chunk-client.mjs';
2
2
  import 'module';
3
3
  import 'url';
4
4
  import 'vm';
5
5
  import 'pathe';
6
6
  import 'mlly';
7
7
  import 'debug';
8
- import './utils-b4f03380.js';
8
+ import './chunk-utils.mjs';
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, c as ModuleCache, M as ModuleCacheMap, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-4b326db0.js';
1
+ export { A as Arrayable, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-93bdaf32.js';
File without changes
package/dist/server.cjs CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var server = require('./server-f6511dc4.js');
5
+ var server = require('./chunk-server.cjs');
6
6
  require('pathe');
7
7
  require('debug');
8
8
  require('fs');
9
9
  require('mlly');
10
- require('./utils-c2e3d5fd.js');
10
+ require('./chunk-utils.cjs');
11
11
  require('url');
12
12
 
13
13
 
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ViteDevServer, TransformResult } from 'vite';
2
- import { D as DepsHandlingOptions, e as ViteNodeServerOptions, F as FetchResult, d as ViteNodeResolveId } from './types-4b326db0.js';
2
+ import { D as DepsHandlingOptions, e as ViteNodeServerOptions, F as FetchResult, d as ViteNodeResolveId } from './types-93bdaf32.js';
3
3
 
4
4
  declare function guessCJSversion(id: string): string | undefined;
5
5
  declare function shouldExternalize(id: string, options?: DepsHandlingOptions, cache?: Map<string, Promise<string | false>>): Promise<string | false>;
@@ -1,7 +1,7 @@
1
- export { V as ViteNodeServer, g as guessCJSversion, s as shouldExternalize } from './server-013a4491.js';
1
+ export { V as ViteNodeServer, g as guessCJSversion, s as shouldExternalize } from './chunk-server.mjs';
2
2
  import 'pathe';
3
3
  import 'debug';
4
4
  import 'fs';
5
5
  import 'mlly';
6
- import './utils-b4f03380.js';
6
+ import './chunk-utils.mjs';
7
7
  import 'url';
@@ -49,9 +49,11 @@ declare class ViteNodeRunner {
49
49
  private debugLog;
50
50
  }
51
51
 
52
+ declare type Nullable<T> = T | null | undefined;
53
+ declare type Arrayable<T> = T | Array<T>;
52
54
  interface DepsHandlingOptions {
53
55
  external?: (string | RegExp)[];
54
- inline?: (string | RegExp)[];
56
+ inline?: (string | RegExp)[] | true;
55
57
  /**
56
58
  * Try to guess the CJS version of a package when it's invalid ESM
57
59
  * @default false
@@ -117,4 +119,4 @@ interface ViteNodeServerOptions {
117
119
  };
118
120
  }
119
121
 
120
- export { DepsHandlingOptions as D, FetchResult as F, ModuleCacheMap as M, RawSourceMap as R, StartOfSourceMap as S, ViteNodeRunnerOptions as V, FetchFunction as a, ResolveIdFunction as b, ModuleCache as c, ViteNodeResolveId as d, ViteNodeServerOptions as e, DEFAULT_REQUEST_STUBS as f, ViteNodeRunner as g };
122
+ export { Arrayable as A, DepsHandlingOptions as D, FetchResult as F, ModuleCacheMap as M, Nullable as N, RawSourceMap as R, StartOfSourceMap as S, ViteNodeRunnerOptions as V, FetchFunction as a, ResolveIdFunction as b, ModuleCache as c, ViteNodeResolveId as d, ViteNodeServerOptions as e, DEFAULT_REQUEST_STUBS as f, ViteNodeRunner as g };
package/dist/types.d.ts CHANGED
@@ -1 +1 @@
1
- export { D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, c as ModuleCache, M as ModuleCacheMap, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-4b326db0.js';
1
+ export { A as Arrayable, D as DepsHandlingOptions, a as FetchFunction, F as FetchResult, c as ModuleCache, M as ModuleCacheMap, N as Nullable, R as RawSourceMap, b as ResolveIdFunction, S as StartOfSourceMap, d as ViteNodeResolveId, V as ViteNodeRunnerOptions, e as ViteNodeServerOptions } from './types-93bdaf32.js';
File without changes
package/dist/utils.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var utils = require('./utils-c2e3d5fd.js');
5
+ var utils = require('./chunk-utils.cjs');
6
6
  require('url');
7
7
  require('pathe');
8
8
 
@@ -14,5 +14,6 @@ exports.mergeSlashes = utils.mergeSlashes;
14
14
  exports.normalizeModuleId = utils.normalizeModuleId;
15
15
  exports.normalizeRequestId = utils.normalizeRequestId;
16
16
  exports.slash = utils.slash;
17
+ exports.toArray = utils.toArray;
17
18
  exports.toFilePath = utils.toFilePath;
18
19
  exports.withInlineSourcemap = utils.withInlineSourcemap;
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { TransformResult } from 'vite';
2
+ import { N as Nullable, A as Arrayable } from './types-93bdaf32.js';
2
3
 
3
4
  declare const isWindows: boolean;
4
5
  declare function slash(str: string): string;
@@ -8,5 +9,11 @@ declare function normalizeModuleId(id: string): string;
8
9
  declare function isPrimitive(v: any): boolean;
9
10
  declare function toFilePath(id: string, root: string): string;
10
11
  declare function withInlineSourcemap(result: TransformResult): Promise<TransformResult>;
12
+ /**
13
+ * Convert `Arrayable<T>` to `Array<T>`
14
+ *
15
+ * @category Array
16
+ */
17
+ declare function toArray<T>(array?: Nullable<Arrayable<T>>): Array<T>;
11
18
 
12
- export { isPrimitive, isWindows, mergeSlashes, normalizeModuleId, normalizeRequestId, slash, toFilePath, withInlineSourcemap };
19
+ export { isPrimitive, isWindows, mergeSlashes, normalizeModuleId, normalizeRequestId, slash, toArray, toFilePath, withInlineSourcemap };
package/dist/utils.mjs ADDED
@@ -0,0 +1,3 @@
1
+ export { i as isPrimitive, c as isWindows, m as mergeSlashes, n as normalizeModuleId, b as normalizeRequestId, s as slash, t as toArray, a as toFilePath, w as withInlineSourcemap } from './chunk-utils.mjs';
2
+ import 'url';
3
+ import 'pathe';
package/package.json CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "vite-node",
3
- "type": "module",
4
- "version": "0.13.1",
3
+ "version": "0.14.2",
5
4
  "description": "Vite as Node.js runtime",
6
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
6
  "license": "MIT",
@@ -19,26 +18,26 @@
19
18
  ".": {
20
19
  "types": "./dist/index.d.ts",
21
20
  "require": "./dist/index.cjs",
22
- "import": "./dist/index.js"
21
+ "import": "./dist/index.mjs"
23
22
  },
24
23
  "./client": {
25
24
  "types": "./dist/client.d.ts",
26
25
  "require": "./dist/client.cjs",
27
- "import": "./dist/client.js"
26
+ "import": "./dist/client.mjs"
28
27
  },
29
28
  "./server": {
30
29
  "types": "./dist/server.d.ts",
31
30
  "require": "./dist/server.cjs",
32
- "import": "./dist/server.js"
31
+ "import": "./dist/server.mjs"
33
32
  },
34
33
  "./utils": {
35
34
  "types": "./dist/utils.d.ts",
36
35
  "require": "./dist/utils.cjs",
37
- "import": "./dist/utils.js"
36
+ "import": "./dist/utils.mjs"
38
37
  }
39
38
  },
40
- "main": "./dist/index.js",
41
- "module": "./dist/index.js",
39
+ "main": "./dist/index.mjs",
40
+ "module": "./dist/index.mjs",
42
41
  "types": "./dist/index.d.ts",
43
42
  "typesVersions": {
44
43
  "*": {
package/vite-node.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- import('./dist/cli.js')
2
+ import('./dist/cli.mjs')
package/dist/utils.js DELETED
@@ -1,3 +0,0 @@
1
- export { i as isPrimitive, b as isWindows, m as mergeSlashes, n as normalizeModuleId, a as normalizeRequestId, s as slash, t as toFilePath, w as withInlineSourcemap } from './utils-b4f03380.js';
2
- import 'url';
3
- import 'pathe';