vite 4.3.6 → 4.3.7
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.
Potentially problematic release.
This version of vite might be problematic. Click here for more details.
|
@@ -38572,8 +38572,8 @@ function createCachedImport(imp) {
|
|
|
38572
38572
|
return cached;
|
|
38573
38573
|
};
|
|
38574
38574
|
}
|
|
38575
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
|
38576
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
|
38575
|
+
const importPostcssImport = createCachedImport(() => import('./dep-7c975f20.js').then(function (n) { return n.i; }));
|
|
38576
|
+
const importPostcssModules = createCachedImport(() => import('./dep-a6949a9d.js').then(function (n) { return n.i; }));
|
|
38577
38577
|
const importPostcss = createCachedImport(() => import('postcss'));
|
|
38578
38578
|
/**
|
|
38579
38579
|
* @experimental
|
|
@@ -41829,11 +41829,14 @@ function assetImportMetaUrlPlugin(config) {
|
|
|
41829
41829
|
s = new MagicString(code);
|
|
41830
41830
|
// potential dynamic template string
|
|
41831
41831
|
if (rawUrl[0] === '`' && rawUrl.includes('${')) {
|
|
41832
|
-
|
|
41833
|
-
|
|
41834
|
-
|
|
41835
|
-
|
|
41836
|
-
|
|
41832
|
+
const queryDelimiterIndex = getQueryDelimiterIndex(rawUrl);
|
|
41833
|
+
const hasQueryDelimiter = queryDelimiterIndex !== -1;
|
|
41834
|
+
const pureUrl = hasQueryDelimiter
|
|
41835
|
+
? rawUrl.slice(0, queryDelimiterIndex) + '`'
|
|
41836
|
+
: rawUrl;
|
|
41837
|
+
const queryString = hasQueryDelimiter
|
|
41838
|
+
? rawUrl.slice(queryDelimiterIndex, -1)
|
|
41839
|
+
: '';
|
|
41837
41840
|
const ast = this.parse(pureUrl);
|
|
41838
41841
|
const templateLiteral = ast.body[0].expression;
|
|
41839
41842
|
if (templateLiteral.expressions.length) {
|
|
@@ -41925,6 +41928,21 @@ function buildGlobPattern(ast) {
|
|
|
41925
41928
|
}
|
|
41926
41929
|
return pattern;
|
|
41927
41930
|
}
|
|
41931
|
+
function getQueryDelimiterIndex(rawUrl) {
|
|
41932
|
+
let bracketsStack = 0;
|
|
41933
|
+
for (let i = 0; i < rawUrl.length; i++) {
|
|
41934
|
+
if (rawUrl[i] === '{') {
|
|
41935
|
+
bracketsStack++;
|
|
41936
|
+
}
|
|
41937
|
+
else if (rawUrl[i] === '}') {
|
|
41938
|
+
bracketsStack--;
|
|
41939
|
+
}
|
|
41940
|
+
else if (rawUrl[i] === '?' && bracketsStack === 0) {
|
|
41941
|
+
return i;
|
|
41942
|
+
}
|
|
41943
|
+
}
|
|
41944
|
+
return -1;
|
|
41945
|
+
}
|
|
41928
41946
|
|
|
41929
41947
|
/**
|
|
41930
41948
|
* plugin to ensure rollup can watch correctly.
|
|
@@ -63262,7 +63280,7 @@ async function _createServer(inlineConfig = {}, options) {
|
|
|
63262
63280
|
}
|
|
63263
63281
|
const watcher = chokidar.watch(
|
|
63264
63282
|
// config file dependencies and env file might be outside of root
|
|
63265
|
-
[root, ...config.configFileDependencies,
|
|
63283
|
+
[root, ...config.configFileDependencies, config.envDir], resolvedWatchOptions);
|
|
63266
63284
|
const moduleGraph = new ModuleGraph((url, ssr) => container.resolveId(url, undefined, { ssr }));
|
|
63267
63285
|
const container = await createPluginContainer(config, moduleGraph, watcher);
|
|
63268
63286
|
const closeHttpServer = createServerCloseFn(httpServer);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as commonjsGlobal, E as getDefaultExportFromCjs } from './dep-
|
|
1
|
+
import { F as commonjsGlobal, E as getDefaultExportFromCjs } from './dep-1f986b87.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 { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-
|
|
5
|
+
import { C as colors, D as bindShortcuts, x as createLogger, h as resolveConfig } from './chunks/dep-1f986b87.js';
|
|
6
6
|
import { VERSION } from './constants.js';
|
|
7
7
|
import 'node:fs/promises';
|
|
8
8
|
import 'node:url';
|
|
@@ -728,7 +728,7 @@ cli
|
|
|
728
728
|
filterDuplicateOptions(options);
|
|
729
729
|
// output structure is preserved even after bundling so require()
|
|
730
730
|
// is ok here
|
|
731
|
-
const { createServer } = await import('./chunks/dep-
|
|
731
|
+
const { createServer } = await import('./chunks/dep-1f986b87.js').then(function (n) { return n.I; });
|
|
732
732
|
try {
|
|
733
733
|
const server = await createServer({
|
|
734
734
|
root,
|
|
@@ -806,7 +806,7 @@ cli
|
|
|
806
806
|
.option('-w, --watch', `[boolean] rebuilds when modules have changed on disk`)
|
|
807
807
|
.action(async (root, options) => {
|
|
808
808
|
filterDuplicateOptions(options);
|
|
809
|
-
const { build } = await import('./chunks/dep-
|
|
809
|
+
const { build } = await import('./chunks/dep-1f986b87.js').then(function (n) { return n.H; });
|
|
810
810
|
const buildOptions = cleanOptions(options);
|
|
811
811
|
try {
|
|
812
812
|
await build({
|
|
@@ -834,7 +834,7 @@ cli
|
|
|
834
834
|
.option('--force', `[boolean] force the optimizer to ignore the cache and re-bundle`)
|
|
835
835
|
.action(async (root, options) => {
|
|
836
836
|
filterDuplicateOptions(options);
|
|
837
|
-
const { optimizeDeps } = await import('./chunks/dep-
|
|
837
|
+
const { optimizeDeps } = await import('./chunks/dep-1f986b87.js').then(function (n) { return n.G; });
|
|
838
838
|
try {
|
|
839
839
|
const config = await resolveConfig({
|
|
840
840
|
root,
|
|
@@ -860,7 +860,7 @@ cli
|
|
|
860
860
|
.option('--outDir <dir>', `[string] output directory (default: dist)`)
|
|
861
861
|
.action(async (root, options) => {
|
|
862
862
|
filterDuplicateOptions(options);
|
|
863
|
-
const { preview } = await import('./chunks/dep-
|
|
863
|
+
const { preview } = await import('./chunks/dep-1f986b87.js').then(function (n) { return n.J; });
|
|
864
864
|
try {
|
|
865
865
|
const server = await preview({
|
|
866
866
|
root,
|
package/dist/node/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isInNodeModules } from './chunks/dep-
|
|
2
|
-
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-
|
|
1
|
+
import { i as isInNodeModules } from './chunks/dep-1f986b87.js';
|
|
2
|
+
export { b as build, e as buildErrorMessage, v as createFilter, x as createLogger, c as createServer, g as defineConfig, f as formatPostcssSourceMap, k as getDepOptimizationConfig, m as isDepsOptimizerEnabled, z as isFileServingAllowed, l as loadConfigFromFile, A as loadEnv, u as mergeAlias, q as mergeConfig, n as normalizePath, o as optimizeDeps, a as preprocessCSS, p as preview, j as resolveBaseUrl, h as resolveConfig, B as resolveEnvPrefix, d as resolvePackageData, r as resolvePackageEntry, y as searchForWorkspaceRoot, w as send, s as sortUserPlugins, t as transformWithEsbuild } from './chunks/dep-1f986b87.js';
|
|
3
3
|
export { VERSION as version } from './constants.js';
|
|
4
4
|
export { version as esbuildVersion } from 'esbuild';
|
|
5
5
|
export { VERSION as rollupVersion } from 'rollup';
|