vite-node 3.2.2 → 3.2.4
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/cli.cjs +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/source-map.cjs +3 -2
- package/dist/source-map.mjs +3 -2
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -21,7 +21,7 @@ require('node:perf_hooks');
|
|
|
21
21
|
require('es-module-lexer');
|
|
22
22
|
require('./constants.cjs');
|
|
23
23
|
|
|
24
|
-
var version = "3.2.
|
|
24
|
+
var version = "3.2.4";
|
|
25
25
|
|
|
26
26
|
const cli = cac("vite-node");
|
|
27
27
|
cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", "Restart on file changes, similar to \"nodemon\"").option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
|
package/dist/cli.mjs
CHANGED
|
@@ -3,23 +3,23 @@ import cac from 'cac';
|
|
|
3
3
|
import { s } from './chunk-browser.mjs';
|
|
4
4
|
import { createServer, version as version$1, loadEnv } from 'vite';
|
|
5
5
|
import { ViteNodeRunner } from './client.mjs';
|
|
6
|
+
import { v as viteNodeHmrPlugin, a as createHotContext, h as handleMessage } from './chunk-hmr.mjs';
|
|
6
7
|
import { ViteNodeServer } from './server.mjs';
|
|
7
8
|
import { installSourcemapsSupport } from './source-map.mjs';
|
|
8
9
|
import { toArray } from './utils.mjs';
|
|
9
|
-
import { v as viteNodeHmrPlugin, a as createHotContext, h as handleMessage } from './chunk-hmr.mjs';
|
|
10
10
|
import 'node:module';
|
|
11
11
|
import 'node:url';
|
|
12
12
|
import 'node:vm';
|
|
13
13
|
import 'debug';
|
|
14
14
|
import 'pathe';
|
|
15
15
|
import 'node:fs';
|
|
16
|
+
import 'node:events';
|
|
16
17
|
import 'node:assert';
|
|
17
18
|
import 'node:perf_hooks';
|
|
18
19
|
import 'es-module-lexer';
|
|
19
20
|
import './constants.mjs';
|
|
20
|
-
import 'node:events';
|
|
21
21
|
|
|
22
|
-
var version = "3.2.
|
|
22
|
+
var version = "3.2.4";
|
|
23
23
|
|
|
24
24
|
const cli = cac("vite-node");
|
|
25
25
|
cli.option("-r, --root <path>", "Use specified root directory").option("-c, --config <path>", "Use specified config file").option("-m, --mode <mode>", "Set env mode").option("-w, --watch", "Restart on file changes, similar to \"nodemon\"").option("--script", "Use vite-node as a script runner").option("--options <options>", "Use specified Vite server options").option("-v, --version", "Output the version number").option("-h, --help", "Display help for command");
|
package/dist/source-map.cjs
CHANGED
|
@@ -688,11 +688,12 @@ function mapSourcePosition(position) {
|
|
|
688
688
|
if (!sourceMap) {
|
|
689
689
|
// Call the (overridable) retrieveSourceMap function to get the source map.
|
|
690
690
|
const urlAndMap = retrieveSourceMap(position.source);
|
|
691
|
-
|
|
691
|
+
const map = urlAndMap && urlAndMap.map;
|
|
692
|
+
if (map && !(typeof map === "object" && "mappings" in map && map.mappings === "")) {
|
|
692
693
|
var _sourceMap$map;
|
|
693
694
|
sourceMap = sourceMapCache[position.source] = {
|
|
694
695
|
url: urlAndMap.url,
|
|
695
|
-
map: new TraceMap(
|
|
696
|
+
map: new TraceMap(map)
|
|
696
697
|
};
|
|
697
698
|
// Load all sources stored inline with the source map into the file cache
|
|
698
699
|
// to pretend like they are already loaded. They may not exist on disk.
|
package/dist/source-map.mjs
CHANGED
|
@@ -686,11 +686,12 @@ function mapSourcePosition(position) {
|
|
|
686
686
|
if (!sourceMap) {
|
|
687
687
|
// Call the (overridable) retrieveSourceMap function to get the source map.
|
|
688
688
|
const urlAndMap = retrieveSourceMap(position.source);
|
|
689
|
-
|
|
689
|
+
const map = urlAndMap && urlAndMap.map;
|
|
690
|
+
if (map && !(typeof map === "object" && "mappings" in map && map.mappings === "")) {
|
|
690
691
|
var _sourceMap$map;
|
|
691
692
|
sourceMap = sourceMapCache[position.source] = {
|
|
692
693
|
url: urlAndMap.url,
|
|
693
|
-
map: new TraceMap(
|
|
694
|
+
map: new TraceMap(map)
|
|
694
695
|
};
|
|
695
696
|
// Load all sources stored inline with the source map into the file cache
|
|
696
697
|
// to pretend like they are already loaded. They may not exist on disk.
|