vite 5.0.0-beta.19 → 5.0.0-beta.20
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/node/chunks/{dep-ZzZNTu4r.js → dep-M-BNPx05.js} +1 -1
- package/dist/node/chunks/{dep-uqAlfqPp.js → dep-T98iZFpD.js} +57 -48
- package/dist/node/chunks/{dep-dkmuXKZ9.js → dep-_v8GkZ9b.js} +1 -1
- package/dist/node/cli.js +6 -6
- package/dist/node/index.d.ts +8 -1
- package/dist/node/index.js +3 -3
- package/package.json +1 -1
|
@@ -12,7 +12,8 @@ import * as require$$0$2 from 'fs';
|
|
|
12
12
|
import require$$0__default, { existsSync, readFileSync, statSync as statSync$1, readdirSync } from 'fs';
|
|
13
13
|
import require$$0$5 from 'events';
|
|
14
14
|
import require$$5 from 'assert';
|
|
15
|
-
import { createServer as createServer$3, STATUS_CODES, get as get$
|
|
15
|
+
import { createServer as createServer$3, STATUS_CODES, get as get$2 } from 'node:http';
|
|
16
|
+
import { createServer as createServer$2, get as get$1 } from 'node:https';
|
|
16
17
|
import require$$0$6 from 'util';
|
|
17
18
|
import require$$4$1 from 'net';
|
|
18
19
|
import require$$0$9 from 'url';
|
|
@@ -36,7 +37,6 @@ import { parseAstAsync, parseAst } from 'rollup/parseAst';
|
|
|
36
37
|
import * as qs from 'querystring';
|
|
37
38
|
import readline from 'node:readline';
|
|
38
39
|
import { EventEmitter as EventEmitter$4 } from 'node:events';
|
|
39
|
-
import { createServer as createServer$2 } from 'node:https';
|
|
40
40
|
import require$$0$b from 'zlib';
|
|
41
41
|
import require$$0$c from 'buffer';
|
|
42
42
|
import require$$1$2 from 'https';
|
|
@@ -12277,12 +12277,12 @@ function numberToPos(source, offset) {
|
|
|
12277
12277
|
}
|
|
12278
12278
|
function generateCodeFrame(source, start = 0, end) {
|
|
12279
12279
|
start = posToNumber(source, start);
|
|
12280
|
-
end = end
|
|
12280
|
+
end = end !== undefined ? posToNumber(source, end) : start;
|
|
12281
12281
|
const lines = source.split(splitRE);
|
|
12282
12282
|
let count = 0;
|
|
12283
12283
|
const res = [];
|
|
12284
12284
|
for (let i = 0; i < lines.length; i++) {
|
|
12285
|
-
count += lines[i].length
|
|
12285
|
+
count += lines[i].length;
|
|
12286
12286
|
if (count >= start) {
|
|
12287
12287
|
for (let j = i - range; j <= i + range || end > count; j++) {
|
|
12288
12288
|
if (j < 0 || j >= lines.length)
|
|
@@ -12292,7 +12292,7 @@ function generateCodeFrame(source, start = 0, end) {
|
|
|
12292
12292
|
const lineLength = lines[j].length;
|
|
12293
12293
|
if (j === i) {
|
|
12294
12294
|
// push underline
|
|
12295
|
-
const pad = Math.max(start - (count - lineLength)
|
|
12295
|
+
const pad = Math.max(start - (count - lineLength), 0);
|
|
12296
12296
|
const length = Math.max(1, end > count ? lineLength - pad : end - start);
|
|
12297
12297
|
res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
|
|
12298
12298
|
}
|
|
@@ -12306,6 +12306,7 @@ function generateCodeFrame(source, start = 0, end) {
|
|
|
12306
12306
|
}
|
|
12307
12307
|
break;
|
|
12308
12308
|
}
|
|
12309
|
+
count++;
|
|
12309
12310
|
}
|
|
12310
12311
|
return res.join('\n');
|
|
12311
12312
|
}
|
|
@@ -14692,14 +14693,7 @@ function resolveEsbuildTranspileOptions(config, format) {
|
|
|
14692
14693
|
function prettifyMessage(m, code) {
|
|
14693
14694
|
let res = colors$1.yellow(m.text);
|
|
14694
14695
|
if (m.location) {
|
|
14695
|
-
|
|
14696
|
-
const line = Number(m.location.line);
|
|
14697
|
-
const column = Number(m.location.column);
|
|
14698
|
-
const offset = lines
|
|
14699
|
-
.slice(0, line - 1)
|
|
14700
|
-
.map((l) => l.length)
|
|
14701
|
-
.reduce((total, l) => total + l + 1, 0) + column;
|
|
14702
|
-
res += `\n` + generateCodeFrame(code, offset, offset + 1);
|
|
14696
|
+
res += `\n` + generateCodeFrame(code, m.location);
|
|
14703
14697
|
}
|
|
14704
14698
|
return res + `\n`;
|
|
14705
14699
|
}
|
|
@@ -27638,7 +27632,7 @@ function resolvePlugin(resolveOptions) {
|
|
|
27638
27632
|
}
|
|
27639
27633
|
else if (isProduction) {
|
|
27640
27634
|
this.warn(`Module "${id}" has been externalized for browser compatibility, imported by "${importer}". ` +
|
|
27641
|
-
`See
|
|
27635
|
+
`See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.`);
|
|
27642
27636
|
}
|
|
27643
27637
|
return isProduction
|
|
27644
27638
|
? browserExternalId
|
|
@@ -27658,7 +27652,7 @@ function resolvePlugin(resolveOptions) {
|
|
|
27658
27652
|
return `\
|
|
27659
27653
|
export default new Proxy({}, {
|
|
27660
27654
|
get(_, key) {
|
|
27661
|
-
throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See
|
|
27655
|
+
throw new Error(\`Module "${id}" has been externalized for browser compatibility. Cannot access "${id}.\${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
|
|
27662
27656
|
}
|
|
27663
27657
|
})`;
|
|
27664
27658
|
}
|
|
@@ -36921,7 +36915,7 @@ function formatParseError(parserError, id, html) {
|
|
|
36921
36915
|
const formattedError = {
|
|
36922
36916
|
code: parserError.code,
|
|
36923
36917
|
message: `parse5 error code ${parserError.code}`,
|
|
36924
|
-
frame: generateCodeFrame(html, parserError.startOffset),
|
|
36918
|
+
frame: generateCodeFrame(html, parserError.startOffset, parserError.endOffset),
|
|
36925
36919
|
loc: {
|
|
36926
36920
|
file: id,
|
|
36927
36921
|
line: parserError.startLine,
|
|
@@ -38443,13 +38437,17 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
38443
38437
|
}
|
|
38444
38438
|
}
|
|
38445
38439
|
else if (message.type === 'warning') {
|
|
38446
|
-
|
|
38447
|
-
|
|
38448
|
-
|
|
38449
|
-
|
|
38450
|
-
|
|
38451
|
-
|
|
38452
|
-
|
|
38440
|
+
const warning = message;
|
|
38441
|
+
let msg = `[vite:css] ${warning.text}`;
|
|
38442
|
+
msg += `\n${generateCodeFrame(code, {
|
|
38443
|
+
line: warning.line,
|
|
38444
|
+
column: warning.column - 1, // 1-based
|
|
38445
|
+
}, warning.endLine !== undefined && warning.endColumn !== undefined
|
|
38446
|
+
? {
|
|
38447
|
+
line: warning.endLine,
|
|
38448
|
+
column: warning.endColumn - 1, // 1-based
|
|
38449
|
+
}
|
|
38450
|
+
: undefined)}`;
|
|
38453
38451
|
config.logger.warn(colors$1.yellow(msg));
|
|
38454
38452
|
}
|
|
38455
38453
|
}
|
|
@@ -38458,8 +38456,9 @@ async function compileCSS(id, code, config, urlReplacer) {
|
|
|
38458
38456
|
e.message = `[postcss] ${e.message}`;
|
|
38459
38457
|
e.code = code;
|
|
38460
38458
|
e.loc = {
|
|
38461
|
-
|
|
38459
|
+
file: e.file,
|
|
38462
38460
|
line: e.line,
|
|
38461
|
+
column: e.column - 1, // 1-based
|
|
38463
38462
|
};
|
|
38464
38463
|
throw e;
|
|
38465
38464
|
}
|
|
@@ -38497,8 +38496,8 @@ function createCachedImport(imp) {
|
|
|
38497
38496
|
return cached;
|
|
38498
38497
|
};
|
|
38499
38498
|
}
|
|
38500
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
|
38501
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
|
38499
|
+
const importPostcssImport = createCachedImport(() => import('./dep-M-BNPx05.js').then(function (n) { return n.i; }));
|
|
38500
|
+
const importPostcssModules = createCachedImport(() => import('./dep-_v8GkZ9b.js').then(function (n) { return n.i; }));
|
|
38502
38501
|
const importPostcss = createCachedImport(() => import('postcss'));
|
|
38503
38502
|
/**
|
|
38504
38503
|
* @experimental
|
|
@@ -39532,7 +39531,7 @@ module.exports = Object.create(new Proxy({}, {
|
|
|
39532
39531
|
key !== 'constructor' &&
|
|
39533
39532
|
key !== 'splice'
|
|
39534
39533
|
) {
|
|
39535
|
-
console.warn(\`Module "${path}" has been externalized for browser compatibility. Cannot access "${path}.\${key}" in client code. See
|
|
39534
|
+
console.warn(\`Module "${path}" has been externalized for browser compatibility. Cannot access "${path}.\${key}" in client code. See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.\`)
|
|
39536
39535
|
}
|
|
39537
39536
|
}
|
|
39538
39537
|
}))`,
|
|
@@ -48258,8 +48257,7 @@ async function ssrTransformScript(code, inMap, url, originalCode) {
|
|
|
48258
48257
|
const importId = `__vite_ssr_import_${uid++}__`;
|
|
48259
48258
|
// Reduce metadata to undefined if it's all default values
|
|
48260
48259
|
if (metadata &&
|
|
48261
|
-
(metadata.
|
|
48262
|
-
metadata.namedImportSpecifiers.length === 0)) {
|
|
48260
|
+
(metadata.importedNames == null || metadata.importedNames.length === 0)) {
|
|
48263
48261
|
metadata = undefined;
|
|
48264
48262
|
}
|
|
48265
48263
|
const metadataStr = metadata ? `, ${JSON.stringify(metadata)}` : '';
|
|
@@ -48279,9 +48277,14 @@ async function ssrTransformScript(code, inMap, url, originalCode) {
|
|
|
48279
48277
|
// import * as ok from 'foo' --> ok -> __import_foo__
|
|
48280
48278
|
if (node.type === 'ImportDeclaration') {
|
|
48281
48279
|
const importId = defineImport(node.source.value, {
|
|
48282
|
-
|
|
48283
|
-
.map((s) =>
|
|
48284
|
-
.
|
|
48280
|
+
importedNames: node.specifiers
|
|
48281
|
+
.map((s) => {
|
|
48282
|
+
if (s.type === 'ImportSpecifier')
|
|
48283
|
+
return s.imported.name;
|
|
48284
|
+
else if (s.type === 'ImportDefaultSpecifier')
|
|
48285
|
+
return 'default';
|
|
48286
|
+
})
|
|
48287
|
+
.filter(isDefined),
|
|
48285
48288
|
});
|
|
48286
48289
|
s.remove(node.start, node.end);
|
|
48287
48290
|
for (const spec of node.specifiers) {
|
|
@@ -48324,7 +48327,7 @@ async function ssrTransformScript(code, inMap, url, originalCode) {
|
|
|
48324
48327
|
if (node.source) {
|
|
48325
48328
|
// export { foo, bar } from './foo'
|
|
48326
48329
|
const importId = defineImport(node.source.value, {
|
|
48327
|
-
|
|
48330
|
+
importedNames: node.specifiers.map((s) => s.local.name),
|
|
48328
48331
|
});
|
|
48329
48332
|
// hoist re-exports near the defined import so they are immediately exported
|
|
48330
48333
|
for (const spec of node.specifiers) {
|
|
@@ -48980,13 +48983,13 @@ function analyzeImportedModDifference(mod, filePath, rawId, metadata, packageCac
|
|
|
48980
48983
|
return;
|
|
48981
48984
|
// For non-ESM, named imports is done via static analysis with cjs-module-lexer in Node.js.
|
|
48982
48985
|
// If the user named imports a specifier that can't be analyzed, error.
|
|
48983
|
-
if (metadata?.
|
|
48984
|
-
const missingBindings = metadata.
|
|
48986
|
+
if (metadata?.importedNames?.length) {
|
|
48987
|
+
const missingBindings = metadata.importedNames.filter((s) => !(s in mod));
|
|
48985
48988
|
if (missingBindings.length) {
|
|
48986
48989
|
const lastBinding = missingBindings[missingBindings.length - 1];
|
|
48987
48990
|
// Copied from Node.js
|
|
48988
48991
|
throw new SyntaxError(`\
|
|
48989
|
-
Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
|
|
48992
|
+
[vite] Named export '${lastBinding}' not found. The requested module '${rawId}' is a CommonJS module, which may not support all module.exports as named exports.
|
|
48990
48993
|
CommonJS modules can always be imported via the default export, for example using:
|
|
48991
48994
|
|
|
48992
48995
|
import pkg from '${rawId}';
|
|
@@ -48999,11 +49002,15 @@ const {${missingBindings.join(', ')}} = pkg;
|
|
|
48999
49002
|
* Guard invalid named exports only, similar to how Node.js errors for top-level imports.
|
|
49000
49003
|
* But since we transform as dynamic imports, we need to emulate the error manually.
|
|
49001
49004
|
*/
|
|
49002
|
-
function proxyGuardOnlyEsm(mod, rawId) {
|
|
49005
|
+
function proxyGuardOnlyEsm(mod, rawId, metadata) {
|
|
49006
|
+
// If the module doesn't import anything explicitly, e.g. `import 'foo'` or
|
|
49007
|
+
// `import * as foo from 'foo'`, we can skip the proxy guard.
|
|
49008
|
+
if (!metadata?.importedNames?.length)
|
|
49009
|
+
return mod;
|
|
49003
49010
|
return new Proxy(mod, {
|
|
49004
49011
|
get(mod, prop) {
|
|
49005
49012
|
if (prop !== 'then' && !(prop in mod)) {
|
|
49006
|
-
throw new SyntaxError(`The requested module '${rawId}' does not provide an export named '${prop.toString()}'`);
|
|
49013
|
+
throw new SyntaxError(`[vite] The requested module '${rawId}' does not provide an export named '${prop.toString()}'`);
|
|
49007
49014
|
}
|
|
49008
49015
|
return mod[prop];
|
|
49009
49016
|
},
|
|
@@ -58414,7 +58421,8 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
58414
58421
|
// preTransformRequests needs to be enabled for this optimization.
|
|
58415
58422
|
if (server.config.server.preTransformRequests) {
|
|
58416
58423
|
setTimeout(() => {
|
|
58417
|
-
get$1
|
|
58424
|
+
const getMethod = path.startsWith('https:') ? get$1 : get$2;
|
|
58425
|
+
getMethod(path, {
|
|
58418
58426
|
headers: {
|
|
58419
58427
|
// Allow the history middleware to redirect to /index.html
|
|
58420
58428
|
Accept: 'text/html',
|
|
@@ -58575,7 +58583,10 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
58575
58583
|
// proxy
|
|
58576
58584
|
const { proxy } = serverConfig;
|
|
58577
58585
|
if (proxy) {
|
|
58578
|
-
|
|
58586
|
+
const middlewareServer = (isObject$1(serverConfig.middlewareMode)
|
|
58587
|
+
? serverConfig.middlewareMode.server
|
|
58588
|
+
: null) || httpServer;
|
|
58589
|
+
middlewares.use(proxyMiddleware(middlewareServer, proxy, config));
|
|
58579
58590
|
}
|
|
58580
58591
|
// base
|
|
58581
58592
|
if (config.base !== '/') {
|
|
@@ -59988,7 +59999,8 @@ function importAnalysisPlugin(config) {
|
|
|
59988
59999
|
url = resolved.id.slice(root.length);
|
|
59989
60000
|
}
|
|
59990
60001
|
else if (depsOptimizer?.isOptimizedDepFile(resolved.id) ||
|
|
59991
|
-
|
|
60002
|
+
(path$o.isAbsolute(cleanUrl(resolved.id)) &&
|
|
60003
|
+
fs$l.existsSync(cleanUrl(resolved.id)))) {
|
|
59992
60004
|
// an optimized deps may not yet exists in the filesystem, or
|
|
59993
60005
|
// a regular file exists but is out of root: rewrite to absolute /@fs/ paths
|
|
59994
60006
|
url = path$o.posix.join(FS_PREFIX, resolved.id);
|
|
@@ -60199,7 +60211,7 @@ function importAnalysisPlugin(config) {
|
|
|
60199
60211
|
this.warn(`\n` +
|
|
60200
60212
|
colors$1.cyan(importerModule.file) +
|
|
60201
60213
|
`\n` +
|
|
60202
|
-
colors$1.reset(generateCodeFrame(source, start)) +
|
|
60214
|
+
colors$1.reset(generateCodeFrame(source, start, end)) +
|
|
60203
60215
|
colors$1.yellow(`\nThe above dynamic import cannot be analyzed by Vite.\n` +
|
|
60204
60216
|
`See ${colors$1.blue(`https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations`)} ` +
|
|
60205
60217
|
`for supported dynamic import formats. ` +
|
|
@@ -61690,9 +61702,6 @@ async function createPluginContainer(config, moduleGraph, watcher) {
|
|
|
61690
61702
|
if (err.pluginCode) {
|
|
61691
61703
|
return err; // The plugin likely called `this.error`
|
|
61692
61704
|
}
|
|
61693
|
-
if (err.file && err.name === 'CssSyntaxError') {
|
|
61694
|
-
err.id = normalizePath$3(err.file);
|
|
61695
|
-
}
|
|
61696
61705
|
if (ctx._activePlugin)
|
|
61697
61706
|
err.plugin = ctx._activePlugin.name;
|
|
61698
61707
|
if (ctx._activeId && !err.id)
|
|
@@ -61738,7 +61747,7 @@ async function createPluginContainer(config, moduleGraph, watcher) {
|
|
|
61738
61747
|
line: err.line,
|
|
61739
61748
|
column: err.column,
|
|
61740
61749
|
};
|
|
61741
|
-
err.frame = err.frame || generateCodeFrame(
|
|
61750
|
+
err.frame = err.frame || generateCodeFrame(ctx._activeCode, err.loc);
|
|
61742
61751
|
}
|
|
61743
61752
|
if (ctx instanceof TransformContext &&
|
|
61744
61753
|
typeof err.loc?.line === 'number' &&
|
|
@@ -66206,7 +66215,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
66206
66215
|
}
|
|
66207
66216
|
catch { }
|
|
66208
66217
|
if (canResolveWithImport) {
|
|
66209
|
-
throw new Error(`Failed to resolve ${JSON.stringify(id)}. This package is ESM only but it was tried to load by \`require\`. See
|
|
66218
|
+
throw new Error(`Failed to resolve ${JSON.stringify(id)}. This package is ESM only but it was tried to load by \`require\`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`);
|
|
66210
66219
|
}
|
|
66211
66220
|
}
|
|
66212
66221
|
throw e;
|
|
@@ -66217,7 +66226,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
66217
66226
|
if (idFsPath &&
|
|
66218
66227
|
!isImport &&
|
|
66219
66228
|
isFilePathESM(idFsPath, packageCache)) {
|
|
66220
|
-
throw new Error(`${JSON.stringify(id)} resolved to an ESM file. ESM file cannot be loaded by \`require\`. See
|
|
66229
|
+
throw new Error(`${JSON.stringify(id)} resolved to an ESM file. ESM file cannot be loaded by \`require\`. See https://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only for more details.`);
|
|
66221
66230
|
}
|
|
66222
66231
|
return {
|
|
66223
66232
|
path: idFsPath,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-
|
|
1
|
+
import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-T98iZFpD.js';
|
|
2
2
|
import require$$0__default from 'fs';
|
|
3
3
|
import require$$0 from 'postcss';
|
|
4
4
|
import require$$0$1 from 'path';
|
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 { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { x as colors, k as createLogger, r as resolveConfig } from './chunks/dep-T98iZFpD.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -14,6 +14,7 @@ import 'path';
|
|
|
14
14
|
import 'fs';
|
|
15
15
|
import 'assert';
|
|
16
16
|
import 'node:http';
|
|
17
|
+
import 'node:https';
|
|
17
18
|
import 'util';
|
|
18
19
|
import 'net';
|
|
19
20
|
import 'url';
|
|
@@ -36,7 +37,6 @@ import 'rollup/parseAst';
|
|
|
36
37
|
import 'querystring';
|
|
37
38
|
import 'node:readline';
|
|
38
39
|
import 'node:events';
|
|
39
|
-
import 'node:https';
|
|
40
40
|
import 'zlib';
|
|
41
41
|
import 'buffer';
|
|
42
42
|
import 'https';
|
|
@@ -759,7 +759,7 @@ cli
|
|
|
759
759
|
filterDuplicateOptions(options);
|
|
760
760
|
// output structure is preserved even after bundling so require()
|
|
761
761
|
// is ok here
|
|
762
|
-
const { createServer } = await import('./chunks/dep-
|
|
762
|
+
const { createServer } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.A; });
|
|
763
763
|
try {
|
|
764
764
|
const server = await createServer({
|
|
765
765
|
root,
|
|
@@ -839,7 +839,7 @@ cli
|
|
|
839
839
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
840
840
|
.action(async (root, options) => {
|
|
841
841
|
filterDuplicateOptions(options);
|
|
842
|
-
const { build } = await import('./chunks/dep-
|
|
842
|
+
const { build } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.C; });
|
|
843
843
|
const buildOptions = cleanOptions(options);
|
|
844
844
|
try {
|
|
845
845
|
await build({
|
|
@@ -867,7 +867,7 @@ cli
|
|
|
867
867
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
868
868
|
.action(async (root, options) => {
|
|
869
869
|
filterDuplicateOptions(options);
|
|
870
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
870
|
+
const { optimizeDeps } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.B; });
|
|
871
871
|
try {
|
|
872
872
|
const config = await resolveConfig({
|
|
873
873
|
root,
|
|
@@ -893,7 +893,7 @@ cli
|
|
|
893
893
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
894
894
|
.action(async (root, options) => {
|
|
895
895
|
filterDuplicateOptions(options);
|
|
896
|
-
const { preview } = await import('./chunks/dep-
|
|
896
|
+
const { preview } = await import('./chunks/dep-T98iZFpD.js').then(function (n) { return n.D; });
|
|
897
897
|
try {
|
|
898
898
|
const server = await preview({
|
|
899
899
|
root,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1508,7 +1508,14 @@ interface ServerOptions extends CommonServerOptions {
|
|
|
1508
1508
|
* Create Vite dev server to be used as a middleware in an existing server
|
|
1509
1509
|
* @default false
|
|
1510
1510
|
*/
|
|
1511
|
-
middlewareMode?: boolean
|
|
1511
|
+
middlewareMode?: boolean | {
|
|
1512
|
+
/**
|
|
1513
|
+
* Parent server instance to attach to
|
|
1514
|
+
*
|
|
1515
|
+
* This is needed to proxy WebSocket connections to the parent server.
|
|
1516
|
+
*/
|
|
1517
|
+
server: http.Server;
|
|
1518
|
+
};
|
|
1512
1519
|
/**
|
|
1513
1520
|
* Options for files served via '/\@fs/'.
|
|
1514
1521
|
*/
|
package/dist/node/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
|
2
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
3
|
-
export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
2
|
+
import { i as isInNodeModules } from './chunks/dep-T98iZFpD.js';
|
|
3
|
+
export { b as build, e as buildErrorMessage, h as createFilter, k as createLogger, c as createServer, d as defineConfig, f as formatPostcssSourceMap, u as isFileServingAllowed, l as loadConfigFromFile, v as loadEnv, g as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, r as resolveConfig, w as resolveEnvPrefix, q as searchForWorkspaceRoot, j as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-T98iZFpD.js';
|
|
4
4
|
export { VERSION as version } from './constants.js';
|
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
|
6
6
|
export { VERSION as rollupVersion } from 'rollup';
|
|
@@ -17,6 +17,7 @@ import 'fs';
|
|
|
17
17
|
import 'events';
|
|
18
18
|
import 'assert';
|
|
19
19
|
import 'node:http';
|
|
20
|
+
import 'node:https';
|
|
20
21
|
import 'util';
|
|
21
22
|
import 'net';
|
|
22
23
|
import 'url';
|
|
@@ -37,7 +38,6 @@ import 'node:v8';
|
|
|
37
38
|
import 'querystring';
|
|
38
39
|
import 'node:readline';
|
|
39
40
|
import 'node:events';
|
|
40
|
-
import 'node:https';
|
|
41
41
|
import 'zlib';
|
|
42
42
|
import 'buffer';
|
|
43
43
|
import 'https';
|