vite 5.2.9 → 5.2.10
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-DbzVZKyq.js → dep-DI-l0F6S.js} +1 -1
- package/dist/node/chunks/{dep-_QLjGPdL.js → dep-DkOS1hkm.js} +130 -104
- package/dist/node/chunks/{dep-DHU7GEFN.js → dep-irZ_Evzk.js} +1 -1
- package/dist/node/cli.js +5 -5
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +2 -2
- package/index.cjs +1 -0
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { C as commonjsGlobal, B as getDefaultExportFromCjs } from './dep-DkOS1hkm.js';
|
2
2
|
import require$$0__default from 'fs';
|
3
3
|
import require$$0 from 'postcss';
|
4
4
|
import require$$0$1 from 'path';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import fs$l, { promises as promises$1 } from 'node:fs';
|
2
2
|
import fsp from 'node:fs/promises';
|
3
|
-
import path$o, { posix as posix$1, isAbsolute as isAbsolute$2,
|
3
|
+
import path$o, { posix as posix$1, isAbsolute as isAbsolute$2, join as join$2, extname as extname$1, dirname as dirname$2, relative as relative$2, basename as basename$2 } from 'node:path';
|
4
4
|
import { fileURLToPath, URL as URL$3, parse as parse$i, pathToFileURL } from 'node:url';
|
5
5
|
import { promisify as promisify$4, format as format$2, inspect } from 'node:util';
|
6
6
|
import { performance } from 'node:perf_hooks';
|
@@ -12243,7 +12243,9 @@ function testCaseInsensitiveFS() {
|
|
12243
12243
|
}
|
12244
12244
|
return fs$l.existsSync(CLIENT_ENTRY.replace('client.mjs', 'cLiEnT.mjs'));
|
12245
12245
|
}
|
12246
|
-
const urlCanParse =
|
12246
|
+
const urlCanParse =
|
12247
|
+
// eslint-disable-next-line n/no-unsupported-features/node-builtins
|
12248
|
+
URL$3.canParse ??
|
12247
12249
|
// URL.canParse is supported from Node.js 18.17.0+, 20.0.0+
|
12248
12250
|
((path, base) => {
|
12249
12251
|
try {
|
@@ -31237,14 +31239,21 @@ function injectNonceAttributeTagHook(config) {
|
|
31237
31239
|
if (!nodeIsElement(node)) {
|
31238
31240
|
return;
|
31239
31241
|
}
|
31240
|
-
|
31241
|
-
|
31242
|
-
|
31242
|
+
const { nodeName, attrs, sourceCodeLocation } = node;
|
31243
|
+
if (nodeName === 'script' ||
|
31244
|
+
nodeName === 'style' ||
|
31245
|
+
(nodeName === 'link' &&
|
31246
|
+
attrs.some((attr) => attr.name === 'rel' &&
|
31243
31247
|
parseRelAttr(attr.value).some((a) => processRelType.has(a))))) {
|
31248
|
+
// If we already have a nonce attribute, we don't need to add another one
|
31249
|
+
if (attrs.some(({ name }) => name === 'nonce')) {
|
31250
|
+
return;
|
31251
|
+
}
|
31252
|
+
const startTagEndOffset = sourceCodeLocation.startTag.endOffset;
|
31244
31253
|
// if the closing of the start tag includes a `/`, the offset should be 2 so the nonce
|
31245
31254
|
// is appended prior to the `/`
|
31246
|
-
const appendOffset = html[
|
31247
|
-
s.appendRight(
|
31255
|
+
const appendOffset = html[startTagEndOffset - 2] === '/' ? 2 : 1;
|
31256
|
+
s.appendRight(startTagEndOffset - appendOffset, ` nonce="${nonce}"`);
|
31248
31257
|
}
|
31249
31258
|
});
|
31250
31259
|
return s.toString();
|
@@ -32356,8 +32365,8 @@ function createCachedImport(imp) {
|
|
32356
32365
|
return cached;
|
32357
32366
|
};
|
32358
32367
|
}
|
32359
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
32360
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
32368
|
+
const importPostcssImport = createCachedImport(() => import('./dep-irZ_Evzk.js').then(function (n) { return n.i; }));
|
32369
|
+
const importPostcssModules = createCachedImport(() => import('./dep-DI-l0F6S.js').then(function (n) { return n.i; }));
|
32361
32370
|
const importPostcss = createCachedImport(() => import('postcss'));
|
32362
32371
|
const preprocessorWorkerControllerCache = new WeakMap();
|
32363
32372
|
let alwaysFakeWorkerWorkerControllerCache;
|
@@ -47137,68 +47146,6 @@ function setClientErrorHandler(server, logger) {
|
|
47137
47146
|
});
|
47138
47147
|
}
|
47139
47148
|
|
47140
|
-
// https://github.com/vitejs/vite/issues/2820#issuecomment-812495079
|
47141
|
-
const ROOT_FILES = [
|
47142
|
-
// '.git',
|
47143
|
-
// https://pnpm.io/workspaces/
|
47144
|
-
'pnpm-workspace.yaml',
|
47145
|
-
// https://rushjs.io/pages/advanced/config_files/
|
47146
|
-
// 'rush.json',
|
47147
|
-
// https://nx.dev/latest/react/getting-started/nx-setup
|
47148
|
-
// 'workspace.json',
|
47149
|
-
// 'nx.json',
|
47150
|
-
// https://github.com/lerna/lerna#lernajson
|
47151
|
-
'lerna.json',
|
47152
|
-
];
|
47153
|
-
// npm: https://docs.npmjs.com/cli/v7/using-npm/workspaces#installing-workspaces
|
47154
|
-
// yarn: https://classic.yarnpkg.com/en/docs/workspaces/#toc-how-to-use-it
|
47155
|
-
function hasWorkspacePackageJSON(root) {
|
47156
|
-
const path = join$2(root, 'package.json');
|
47157
|
-
if (!isFileReadable(path)) {
|
47158
|
-
return false;
|
47159
|
-
}
|
47160
|
-
try {
|
47161
|
-
const content = JSON.parse(fs$l.readFileSync(path, 'utf-8')) || {};
|
47162
|
-
return !!content.workspaces;
|
47163
|
-
}
|
47164
|
-
catch {
|
47165
|
-
return false;
|
47166
|
-
}
|
47167
|
-
}
|
47168
|
-
function hasRootFile(root) {
|
47169
|
-
return ROOT_FILES.some((file) => fs$l.existsSync(join$2(root, file)));
|
47170
|
-
}
|
47171
|
-
function hasPackageJSON(root) {
|
47172
|
-
const path = join$2(root, 'package.json');
|
47173
|
-
return fs$l.existsSync(path);
|
47174
|
-
}
|
47175
|
-
/**
|
47176
|
-
* Search up for the nearest `package.json`
|
47177
|
-
*/
|
47178
|
-
function searchForPackageRoot(current, root = current) {
|
47179
|
-
if (hasPackageJSON(current))
|
47180
|
-
return current;
|
47181
|
-
const dir = dirname$2(current);
|
47182
|
-
// reach the fs root
|
47183
|
-
if (!dir || dir === current)
|
47184
|
-
return root;
|
47185
|
-
return searchForPackageRoot(dir, root);
|
47186
|
-
}
|
47187
|
-
/**
|
47188
|
-
* Search up for the nearest workspace root
|
47189
|
-
*/
|
47190
|
-
function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
|
47191
|
-
if (hasRootFile(current))
|
47192
|
-
return current;
|
47193
|
-
if (hasWorkspacePackageJSON(current))
|
47194
|
-
return current;
|
47195
|
-
const dir = dirname$2(current);
|
47196
|
-
// reach the fs root
|
47197
|
-
if (!dir || dir === current)
|
47198
|
-
return root;
|
47199
|
-
return searchForWorkspaceRoot(dir, root);
|
47200
|
-
}
|
47201
|
-
|
47202
47149
|
// An implementation of fsUtils without caching
|
47203
47150
|
const commonFsUtils = {
|
47204
47151
|
existsSync: fs$l.existsSync,
|
@@ -47274,7 +47221,7 @@ function pathUntilPart(root, parts, i) {
|
|
47274
47221
|
return p;
|
47275
47222
|
}
|
47276
47223
|
function createCachedFsUtils(config) {
|
47277
|
-
const root =
|
47224
|
+
const root = config.root; // root is resolved and normalized, so it doesn't have a trailing slash
|
47278
47225
|
const rootDirPath = `${root}/`;
|
47279
47226
|
const rootCache = { type: 'directory' }; // dirents will be computed lazily
|
47280
47227
|
const getDirentCacheSync = (parts) => {
|
@@ -53065,9 +53012,9 @@ async function extractExportsData(filePath, config, ssr) {
|
|
53065
53012
|
write: false,
|
53066
53013
|
format: 'esm',
|
53067
53014
|
});
|
53068
|
-
const [
|
53015
|
+
const [, exports, , hasModuleSyntax] = parse$e(result.outputFiles[0].text);
|
53069
53016
|
return {
|
53070
|
-
|
53017
|
+
hasModuleSyntax,
|
53071
53018
|
exports: exports.map((e) => e.n),
|
53072
53019
|
};
|
53073
53020
|
}
|
@@ -53086,9 +53033,9 @@ async function extractExportsData(filePath, config, ssr) {
|
|
53086
53033
|
parseResult = parse$e(transformed.code);
|
53087
53034
|
usedJsxLoader = true;
|
53088
53035
|
}
|
53089
|
-
const [
|
53036
|
+
const [, exports, , hasModuleSyntax] = parseResult;
|
53090
53037
|
const exportsData = {
|
53091
|
-
|
53038
|
+
hasModuleSyntax,
|
53092
53039
|
exports: exports.map((e) => e.n),
|
53093
53040
|
jsxLoader: usedJsxLoader,
|
53094
53041
|
};
|
@@ -53098,9 +53045,9 @@ function needsInterop(config, ssr, id, exportsData, output) {
|
|
53098
53045
|
if (getDepOptimizationConfig(config, ssr)?.needsInterop?.includes(id)) {
|
53099
53046
|
return true;
|
53100
53047
|
}
|
53101
|
-
const {
|
53048
|
+
const { hasModuleSyntax, exports } = exportsData;
|
53102
53049
|
// entry has no ESM syntax - likely CJS or UMD
|
53103
|
-
if (!
|
53050
|
+
if (!hasModuleSyntax) {
|
53104
53051
|
return true;
|
53105
53052
|
}
|
53106
53053
|
if (output) {
|
@@ -56436,7 +56383,26 @@ const BASE_PREVIEW_SHORTCUTS = [
|
|
56436
56383
|
},
|
56437
56384
|
];
|
56438
56385
|
|
56439
|
-
function
|
56386
|
+
function getResolvedOutDirs(root, outDir, outputOptions) {
|
56387
|
+
const resolvedOutDir = path$o.resolve(root, outDir);
|
56388
|
+
if (!outputOptions)
|
56389
|
+
return new Set([resolvedOutDir]);
|
56390
|
+
return new Set(arraify(outputOptions).map(({ dir }) => dir ? path$o.resolve(root, dir) : resolvedOutDir));
|
56391
|
+
}
|
56392
|
+
function resolveEmptyOutDir(emptyOutDir, root, outDirs, logger) {
|
56393
|
+
if (emptyOutDir != null)
|
56394
|
+
return emptyOutDir;
|
56395
|
+
for (const outDir of outDirs) {
|
56396
|
+
if (!normalizePath$3(outDir).startsWith(withTrailingSlash(root))) {
|
56397
|
+
// warn if outDir is outside of root
|
56398
|
+
logger?.warn(picocolorsExports.yellow(`\n${picocolorsExports.bold(`(!)`)} outDir ${picocolorsExports.white(picocolorsExports.dim(outDir))} is not inside project root and will not be emptied.\n` +
|
56399
|
+
`Use --emptyOutDir to override.\n`));
|
56400
|
+
return false;
|
56401
|
+
}
|
56402
|
+
}
|
56403
|
+
return true;
|
56404
|
+
}
|
56405
|
+
function resolveChokidarOptions(config, options, resolvedOutDirs, emptyOutDir) {
|
56440
56406
|
const { ignored: ignoredList, ...otherOptions } = options ?? {};
|
56441
56407
|
const ignored = [
|
56442
56408
|
'**/.git/**',
|
@@ -56445,8 +56411,8 @@ function resolveChokidarOptions(config, options) {
|
|
56445
56411
|
glob.escapePath(config.cacheDir) + '/**',
|
56446
56412
|
...arraify(ignoredList || []),
|
56447
56413
|
];
|
56448
|
-
if (
|
56449
|
-
ignored.push(
|
56414
|
+
if (emptyOutDir) {
|
56415
|
+
ignored.push(...[...resolvedOutDirs].map((outDir) => glob.escapePath(outDir) + '/**'));
|
56450
56416
|
}
|
56451
56417
|
const resolvedWatchOptions = {
|
56452
56418
|
ignored,
|
@@ -63980,7 +63946,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
63980
63946
|
const trailingSlash = htmlPath.endsWith('/');
|
63981
63947
|
if (!trailingSlash && getFsUtils(config).existsSync(filename)) {
|
63982
63948
|
proxyModulePath = htmlPath;
|
63983
|
-
proxyModuleUrl =
|
63949
|
+
proxyModuleUrl = proxyModulePath;
|
63984
63950
|
}
|
63985
63951
|
else {
|
63986
63952
|
// There are users of vite.transformIndexHtml calling it with url '/'
|
@@ -63992,6 +63958,7 @@ const devHtmlHook = async (html, { path: htmlPath, filename, server, originalUrl
|
|
63992
63958
|
proxyModulePath = `\0${validPath}`;
|
63993
63959
|
proxyModuleUrl = wrapId$1(proxyModulePath);
|
63994
63960
|
}
|
63961
|
+
proxyModuleUrl = joinUrlSegments(base, proxyModuleUrl);
|
63995
63962
|
const s = new MagicString(html);
|
63996
63963
|
let inlineModuleIndex = -1;
|
63997
63964
|
// The key to the proxyHtml cache is decoded, as it will be compared
|
@@ -64598,6 +64565,68 @@ function notFoundMiddleware() {
|
|
64598
64565
|
};
|
64599
64566
|
}
|
64600
64567
|
|
64568
|
+
// https://github.com/vitejs/vite/issues/2820#issuecomment-812495079
|
64569
|
+
const ROOT_FILES = [
|
64570
|
+
// '.git',
|
64571
|
+
// https://pnpm.io/workspaces/
|
64572
|
+
'pnpm-workspace.yaml',
|
64573
|
+
// https://rushjs.io/pages/advanced/config_files/
|
64574
|
+
// 'rush.json',
|
64575
|
+
// https://nx.dev/latest/react/getting-started/nx-setup
|
64576
|
+
// 'workspace.json',
|
64577
|
+
// 'nx.json',
|
64578
|
+
// https://github.com/lerna/lerna#lernajson
|
64579
|
+
'lerna.json',
|
64580
|
+
];
|
64581
|
+
// npm: https://docs.npmjs.com/cli/v7/using-npm/workspaces#installing-workspaces
|
64582
|
+
// yarn: https://classic.yarnpkg.com/en/docs/workspaces/#toc-how-to-use-it
|
64583
|
+
function hasWorkspacePackageJSON(root) {
|
64584
|
+
const path = join$2(root, 'package.json');
|
64585
|
+
if (!isFileReadable(path)) {
|
64586
|
+
return false;
|
64587
|
+
}
|
64588
|
+
try {
|
64589
|
+
const content = JSON.parse(fs$l.readFileSync(path, 'utf-8')) || {};
|
64590
|
+
return !!content.workspaces;
|
64591
|
+
}
|
64592
|
+
catch {
|
64593
|
+
return false;
|
64594
|
+
}
|
64595
|
+
}
|
64596
|
+
function hasRootFile(root) {
|
64597
|
+
return ROOT_FILES.some((file) => fs$l.existsSync(join$2(root, file)));
|
64598
|
+
}
|
64599
|
+
function hasPackageJSON(root) {
|
64600
|
+
const path = join$2(root, 'package.json');
|
64601
|
+
return fs$l.existsSync(path);
|
64602
|
+
}
|
64603
|
+
/**
|
64604
|
+
* Search up for the nearest `package.json`
|
64605
|
+
*/
|
64606
|
+
function searchForPackageRoot(current, root = current) {
|
64607
|
+
if (hasPackageJSON(current))
|
64608
|
+
return current;
|
64609
|
+
const dir = dirname$2(current);
|
64610
|
+
// reach the fs root
|
64611
|
+
if (!dir || dir === current)
|
64612
|
+
return root;
|
64613
|
+
return searchForPackageRoot(dir, root);
|
64614
|
+
}
|
64615
|
+
/**
|
64616
|
+
* Search up for the nearest workspace root
|
64617
|
+
*/
|
64618
|
+
function searchForWorkspaceRoot(current, root = searchForPackageRoot(current)) {
|
64619
|
+
if (hasRootFile(current))
|
64620
|
+
return current;
|
64621
|
+
if (hasWorkspacePackageJSON(current))
|
64622
|
+
return current;
|
64623
|
+
const dir = dirname$2(current);
|
64624
|
+
// reach the fs root
|
64625
|
+
if (!dir || dir === current)
|
64626
|
+
return root;
|
64627
|
+
return searchForWorkspaceRoot(dir, root);
|
64628
|
+
}
|
64629
|
+
|
64601
64630
|
function warmupFiles(server) {
|
64602
64631
|
const options = server.config.server.warmup;
|
64603
64632
|
const root = server.config.root;
|
@@ -64675,10 +64704,12 @@ async function _createServer(inlineConfig = {}, options) {
|
|
64675
64704
|
const { root, server: serverConfig } = config;
|
64676
64705
|
const httpsOptions = await resolveHttpsConfig(config.server.https);
|
64677
64706
|
const { middlewareMode } = serverConfig;
|
64707
|
+
const resolvedOutDirs = getResolvedOutDirs(config.root, config.build.outDir, config.build.rollupOptions?.output);
|
64708
|
+
const emptyOutDir = resolveEmptyOutDir(config.build.emptyOutDir, config.root, resolvedOutDirs);
|
64678
64709
|
const resolvedWatchOptions = resolveChokidarOptions(config, {
|
64679
64710
|
disableGlobbing: true,
|
64680
64711
|
...serverConfig.watch,
|
64681
|
-
});
|
64712
|
+
}, resolvedOutDirs, emptyOutDir);
|
64682
64713
|
const middlewares = connect$1();
|
64683
64714
|
const httpServer = middlewareMode
|
64684
64715
|
? null
|
@@ -67414,11 +67445,12 @@ async function build(inlineConfig = {}) {
|
|
67414
67445
|
else {
|
67415
67446
|
normalizedOutputs.push(buildOutputOptions(outputs));
|
67416
67447
|
}
|
67417
|
-
const
|
67448
|
+
const resolvedOutDirs = getResolvedOutDirs(config.root, options.outDir, options.rollupOptions?.output);
|
67449
|
+
const emptyOutDir = resolveEmptyOutDir(options.emptyOutDir, config.root, resolvedOutDirs, config.logger);
|
67418
67450
|
// watch file changes with rollup
|
67419
67451
|
if (config.build.watch) {
|
67420
67452
|
config.logger.info(colors$1.cyan(`\nwatching for file changes...`));
|
67421
|
-
const resolvedChokidarOptions = resolveChokidarOptions(config, config.build.watch.chokidar);
|
67453
|
+
const resolvedChokidarOptions = resolveChokidarOptions(config, config.build.watch.chokidar, resolvedOutDirs, emptyOutDir);
|
67422
67454
|
const { watch } = await import('rollup');
|
67423
67455
|
const watcher = watch({
|
67424
67456
|
...rollupOptions,
|
@@ -67432,7 +67464,7 @@ async function build(inlineConfig = {}) {
|
|
67432
67464
|
if (event.code === 'BUNDLE_START') {
|
67433
67465
|
config.logger.info(colors$1.cyan(`\nbuild started...`));
|
67434
67466
|
if (options.write) {
|
67435
|
-
prepareOutDir(
|
67467
|
+
prepareOutDir(resolvedOutDirs, emptyOutDir, config);
|
67436
67468
|
}
|
67437
67469
|
}
|
67438
67470
|
else if (event.code === 'BUNDLE_END') {
|
@@ -67450,7 +67482,7 @@ async function build(inlineConfig = {}) {
|
|
67450
67482
|
startTime = Date.now();
|
67451
67483
|
bundle = await rollup(rollupOptions);
|
67452
67484
|
if (options.write) {
|
67453
|
-
prepareOutDir(
|
67485
|
+
prepareOutDir(resolvedOutDirs, emptyOutDir, config);
|
67454
67486
|
}
|
67455
67487
|
const res = [];
|
67456
67488
|
for (const output of normalizedOutputs) {
|
@@ -67474,24 +67506,11 @@ async function build(inlineConfig = {}) {
|
|
67474
67506
|
}
|
67475
67507
|
}
|
67476
67508
|
function prepareOutDir(outDirs, emptyOutDir, config) {
|
67477
|
-
const
|
67478
|
-
|
67479
|
-
|
67480
|
-
for (const outDir of nonDuplicateDirs) {
|
67481
|
-
if (fs$l.existsSync(outDir) &&
|
67482
|
-
!normalizePath$3(outDir).startsWith(withTrailingSlash(config.root))) {
|
67483
|
-
// warn if outDir is outside of root
|
67484
|
-
config.logger.warn(colors$1.yellow(`\n${colors$1.bold(`(!)`)} outDir ${colors$1.white(colors$1.dim(outDir))} is not inside project root and will not be emptied.\n` +
|
67485
|
-
`Use --emptyOutDir to override.\n`));
|
67486
|
-
outside = true;
|
67487
|
-
break;
|
67488
|
-
}
|
67489
|
-
}
|
67490
|
-
}
|
67491
|
-
for (const outDir of nonDuplicateDirs) {
|
67492
|
-
if (!outside && emptyOutDir !== false && fs$l.existsSync(outDir)) {
|
67509
|
+
const outDirsArray = [...outDirs];
|
67510
|
+
for (const outDir of outDirs) {
|
67511
|
+
if (emptyOutDir !== false && fs$l.existsSync(outDir)) {
|
67493
67512
|
// skip those other outDirs which are nested in current outDir
|
67494
|
-
const skipDirs =
|
67513
|
+
const skipDirs = outDirsArray
|
67495
67514
|
.map((dir) => {
|
67496
67515
|
const relative = path$o.relative(outDir, dir);
|
67497
67516
|
if (relative &&
|
@@ -68465,6 +68484,13 @@ assetFileNames isn't equal for every build.rollupOptions.output. A single patter
|
|
68465
68484
|
resolved.logger.warn(colors$1.yellow(`
|
68466
68485
|
(!) Experimental legacy.buildSsrCjsExternalHeuristics and ssr.format were be removed in Vite 5.
|
68467
68486
|
The only SSR Output format is ESM. Find more information at https://github.com/vitejs/vite/discussions/13816.
|
68487
|
+
`));
|
68488
|
+
}
|
68489
|
+
const resolvedBuildOutDir = normalizePath$3(path$o.resolve(resolved.root, resolved.build.outDir));
|
68490
|
+
if (isParentDirectory(resolvedBuildOutDir, resolved.root) ||
|
68491
|
+
resolvedBuildOutDir === resolved.root) {
|
68492
|
+
resolved.logger.warn(colors$1.yellow(`
|
68493
|
+
(!) build.outDir must not be the same directory of root or a parent directory of root as this could cause Vite to overwriting source files with build outputs.
|
68468
68494
|
`));
|
68469
68495
|
}
|
68470
68496
|
return resolved;
|
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 colors, v as createLogger, r as resolveConfig } from './chunks/dep-
|
5
|
+
import { A as colors, v as createLogger, r as resolveConfig } from './chunks/dep-DkOS1hkm.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -757,7 +757,7 @@ cli
|
|
757
757
|
filterDuplicateOptions(options);
|
758
758
|
// output structure is preserved even after bundling so require()
|
759
759
|
// is ok here
|
760
|
-
const { createServer } = await import('./chunks/dep-
|
760
|
+
const { createServer } = await import('./chunks/dep-DkOS1hkm.js').then(function (n) { return n.E; });
|
761
761
|
try {
|
762
762
|
const server = await createServer({
|
763
763
|
root,
|
@@ -836,7 +836,7 @@ cli
|
|
836
836
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
837
837
|
.action(async (root, options) => {
|
838
838
|
filterDuplicateOptions(options);
|
839
|
-
const { build } = await import('./chunks/dep-
|
839
|
+
const { build } = await import('./chunks/dep-DkOS1hkm.js').then(function (n) { return n.F; });
|
840
840
|
const buildOptions = cleanOptions(options);
|
841
841
|
try {
|
842
842
|
await build({
|
@@ -863,7 +863,7 @@ cli
|
|
863
863
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
864
864
|
.action(async (root, options) => {
|
865
865
|
filterDuplicateOptions(options);
|
866
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
866
|
+
const { optimizeDeps } = await import('./chunks/dep-DkOS1hkm.js').then(function (n) { return n.D; });
|
867
867
|
try {
|
868
868
|
const config = await resolveConfig({
|
869
869
|
root,
|
@@ -889,7 +889,7 @@ cli
|
|
889
889
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
890
890
|
.action(async (root, options) => {
|
891
891
|
filterDuplicateOptions(options);
|
892
|
-
const { preview } = await import('./chunks/dep-
|
892
|
+
const { preview } = await import('./chunks/dep-DkOS1hkm.js').then(function (n) { return n.G; });
|
893
893
|
try {
|
894
894
|
const server = await preview({
|
895
895
|
root,
|
package/dist/node/index.d.ts
CHANGED
@@ -2548,7 +2548,7 @@ type ESBuildTransformResult = Omit<esbuild_TransformResult, 'map'> & {
|
|
2548
2548
|
declare function transformWithEsbuild(code: string, filename: string, options?: esbuild_TransformOptions, inMap?: object): Promise<ESBuildTransformResult>;
|
2549
2549
|
|
2550
2550
|
type ExportsData = {
|
2551
|
-
|
2551
|
+
hasModuleSyntax: boolean;
|
2552
2552
|
exports: readonly string[];
|
2553
2553
|
jsxLoader?: boolean;
|
2554
2554
|
};
|
package/dist/node/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
export { parseAst, parseAstAsync } from 'rollup/parseAst';
|
2
|
-
import { i as isInNodeModules, a as arraify } from './chunks/dep-
|
3
|
-
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
2
|
+
import { i as isInNodeModules, a as arraify } from './chunks/dep-DkOS1hkm.js';
|
3
|
+
export { b as build, g as buildErrorMessage, k as createFilter, v as createLogger, c as createServer, d as defineConfig, h as fetchModule, f as formatPostcssSourceMap, x as isFileServingAllowed, l as loadConfigFromFile, y as loadEnv, j as mergeAlias, m as mergeConfig, n as normalizePath, o as optimizeDeps, e as preprocessCSS, p as preview, r as resolveConfig, z as resolveEnvPrefix, q as rollupVersion, w as searchForWorkspaceRoot, u as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-DkOS1hkm.js';
|
4
4
|
export { VERSION as version } from './constants.js';
|
5
5
|
export { version as esbuildVersion } from 'esbuild';
|
6
6
|
import { existsSync, readFileSync } from 'node:fs';
|
package/index.cjs
CHANGED
@@ -6,6 +6,7 @@ warnCjsUsage()
|
|
6
6
|
module.exports.defineConfig = (config) => config
|
7
7
|
|
8
8
|
// proxy cjs utils (sync functions)
|
9
|
+
// eslint-disable-next-line n/no-missing-require -- will be generated by build
|
9
10
|
Object.assign(module.exports, require('./dist/node-cjs/publicUtils.cjs'))
|
10
11
|
|
11
12
|
// async functions, can be redirect from ESM build
|