vite 4.0.0-beta.5 → 4.0.0-beta.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.
|
@@ -13392,8 +13392,6 @@ async function transformWithEsbuild(code, filename, options, inMap) {
|
|
|
13392
13392
|
};
|
|
13393
13393
|
}
|
|
13394
13394
|
const resolvedOptions = {
|
|
13395
|
-
// esbuild 0.16.0 & 0.16.1 defaults to 'browser': https://github.com/evanw/esbuild/issues/2718
|
|
13396
|
-
platform: 'neutral',
|
|
13397
13395
|
sourcemap: true,
|
|
13398
13396
|
// ensure source file name contains full query
|
|
13399
13397
|
sourcefile: filename,
|
|
@@ -37613,7 +37611,7 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
37613
37611
|
}));
|
|
37614
37612
|
}
|
|
37615
37613
|
if (isModule) {
|
|
37616
|
-
postcssPlugins.unshift((await import('./dep-
|
|
37614
|
+
postcssPlugins.unshift((await import('./dep-da28aebd.js').then(function (n) { return n.i; })).default({
|
|
37617
37615
|
...modulesOptions,
|
|
37618
37616
|
localsConvention: modulesOptions?.localsConvention,
|
|
37619
37617
|
getJSON(cssFileName, _modules, outputFileName) {
|
|
@@ -53121,6 +53119,17 @@ function rebindErrorStacktrace(e, stacktrace) {
|
|
|
53121
53119
|
e.stack = stacktrace;
|
|
53122
53120
|
}
|
|
53123
53121
|
}
|
|
53122
|
+
const rewroteStacktraces = new WeakSet();
|
|
53123
|
+
function ssrFixStacktrace(e, moduleGraph) {
|
|
53124
|
+
if (!e.stack)
|
|
53125
|
+
return;
|
|
53126
|
+
// stacktrace shouldn't be rewritten more than once
|
|
53127
|
+
if (rewroteStacktraces.has(e))
|
|
53128
|
+
return;
|
|
53129
|
+
const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph);
|
|
53130
|
+
rebindErrorStacktrace(e, stacktrace);
|
|
53131
|
+
rewroteStacktraces.add(e);
|
|
53132
|
+
}
|
|
53124
53133
|
|
|
53125
53134
|
const pendingModules = new Map();
|
|
53126
53135
|
const pendingImports = new Map();
|
|
@@ -53241,9 +53250,8 @@ async function instantiateModule(url, server, context = { global }, urlStack = [
|
|
|
53241
53250
|
catch (e) {
|
|
53242
53251
|
mod.ssrError = e;
|
|
53243
53252
|
if (e.stack && fixStacktrace) {
|
|
53244
|
-
|
|
53245
|
-
|
|
53246
|
-
server.config.logger.error(`Error when evaluating SSR module ${url}:\n${stacktrace}`, {
|
|
53253
|
+
ssrFixStacktrace(e, moduleGraph);
|
|
53254
|
+
server.config.logger.error(`Error when evaluating SSR module ${url}:\n${e.stack}`, {
|
|
53247
53255
|
timestamp: true,
|
|
53248
53256
|
clear: server.config.clearScreen,
|
|
53249
53257
|
error: e,
|
|
@@ -54426,8 +54434,9 @@ function startBrowserProcess(browser, url) {
|
|
|
54426
54434
|
}
|
|
54427
54435
|
|
|
54428
54436
|
function bindShortcuts(server, opts) {
|
|
54429
|
-
if (!server.httpServer)
|
|
54437
|
+
if (!server.httpServer || !process.stdin.isTTY || process.env.CI) {
|
|
54430
54438
|
return;
|
|
54439
|
+
}
|
|
54431
54440
|
server._shortcutsOptions = opts;
|
|
54432
54441
|
if (opts.print) {
|
|
54433
54442
|
server.config.logger.info(picocolors.exports.dim(picocolors.exports.green(' ➜')) +
|
|
@@ -54463,9 +54472,7 @@ function bindShortcuts(server, opts) {
|
|
|
54463
54472
|
await shortcut.action(server);
|
|
54464
54473
|
actionRunning = false;
|
|
54465
54474
|
};
|
|
54466
|
-
|
|
54467
|
-
process.stdin.setRawMode(true);
|
|
54468
|
-
}
|
|
54475
|
+
process.stdin.setRawMode(true);
|
|
54469
54476
|
process.stdin.on('data', onInput).setEncoding('utf8').resume();
|
|
54470
54477
|
server.httpServer.on('close', () => {
|
|
54471
54478
|
process.stdin.off('data', onInput).pause();
|
|
@@ -61920,10 +61927,7 @@ async function createServer(inlineConfig = {}) {
|
|
|
61920
61927
|
return ssrLoadModule(url, server, undefined, undefined, opts?.fixStacktrace);
|
|
61921
61928
|
},
|
|
61922
61929
|
ssrFixStacktrace(e) {
|
|
61923
|
-
|
|
61924
|
-
const stacktrace = ssrRewriteStacktrace(e.stack, moduleGraph);
|
|
61925
|
-
rebindErrorStacktrace(e, stacktrace);
|
|
61926
|
-
}
|
|
61930
|
+
ssrFixStacktrace(e, moduleGraph);
|
|
61927
61931
|
},
|
|
61928
61932
|
ssrRewriteStacktrace(stack) {
|
|
61929
61933
|
return ssrRewriteStacktrace(stack, moduleGraph);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import require$$0__default from 'fs';
|
|
2
2
|
import require$$0 from 'postcss';
|
|
3
|
-
import { C as commonjsGlobal } from './dep-
|
|
3
|
+
import { C as commonjsGlobal } from './dep-cf256579.js';
|
|
4
4
|
import require$$0$1 from 'path';
|
|
5
5
|
import require$$5 from 'crypto';
|
|
6
6
|
import require$$0$2 from 'util';
|
package/dist/node/cli.js
CHANGED
|
@@ -2,7 +2,7 @@ import path from 'node:path';
|
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import { performance } from 'node:perf_hooks';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
|
-
import { A as picocolors, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { A as picocolors, B as bindShortcuts, w as createLogger, h as resolveConfig } from './chunks/dep-cf256579.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:module';
|
|
@@ -725,7 +725,7 @@ cli
|
|
|
725
725
|
filterDuplicateOptions(options);
|
|
726
726
|
// output structure is preserved even after bundling so require()
|
|
727
727
|
// is ok here
|
|
728
|
-
const { createServer } = await import('./chunks/dep-
|
|
728
|
+
const { createServer } = await import('./chunks/dep-cf256579.js').then(function (n) { return n.F; });
|
|
729
729
|
try {
|
|
730
730
|
const server = await createServer({
|
|
731
731
|
root,
|
|
@@ -804,7 +804,7 @@ cli
|
|
|
804
804
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
805
805
|
.action(async (root, options) => {
|
|
806
806
|
filterDuplicateOptions(options);
|
|
807
|
-
const { build } = await import('./chunks/dep-
|
|
807
|
+
const { build } = await import('./chunks/dep-cf256579.js').then(function (n) { return n.E; });
|
|
808
808
|
const buildOptions = cleanOptions(options);
|
|
809
809
|
try {
|
|
810
810
|
await build({
|
|
@@ -832,7 +832,7 @@ cli
|
|
|
832
832
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
833
833
|
.action(async (root, options) => {
|
|
834
834
|
filterDuplicateOptions(options);
|
|
835
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
835
|
+
const { optimizeDeps } = await import('./chunks/dep-cf256579.js').then(function (n) { return n.D; });
|
|
836
836
|
try {
|
|
837
837
|
const config = await resolveConfig({
|
|
838
838
|
root,
|
|
@@ -857,7 +857,7 @@ cli
|
|
|
857
857
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
858
858
|
.action(async (root, options) => {
|
|
859
859
|
filterDuplicateOptions(options);
|
|
860
|
-
const { preview } = await import('./chunks/dep-
|
|
860
|
+
const { preview } = await import('./chunks/dep-cf256579.js').then(function (n) { return n.G; });
|
|
861
861
|
try {
|
|
862
862
|
const server = await preview({
|
|
863
863
|
root,
|
package/dist/node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
export { b as build, e as buildErrorMessage, u as createFilter, w as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, j as getDepOptimizationConfig, k as isDepsOptimizerEnabled, l as loadConfigFromFile, y as loadEnv, q as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, i as resolveBaseUrl, h as resolveConfig, z as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, x as searchForWorkspaceRoot, v as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-cf256579.js';
|
|
2
2
|
export { VERSION as version } from './constants.js';
|
|
3
3
|
export { version as esbuildVersion } from 'esbuild';
|
|
4
4
|
export { VERSION as rollupVersion } from 'rollup';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"//": "READ CONTRIBUTING.md to understand what to put under deps vs. devDeps!",
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"esbuild": "^0.16.
|
|
61
|
+
"esbuild": "^0.16.2",
|
|
62
62
|
"postcss": "^8.4.19",
|
|
63
63
|
"resolve": "^1.22.1",
|
|
64
|
-
"rollup": "^3.
|
|
64
|
+
"rollup": "^3.7.0"
|
|
65
65
|
},
|
|
66
66
|
"optionalDependencies": {
|
|
67
67
|
"fsevents": "~2.3.2"
|