vite 5.0.9 → 5.0.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.
@@ -16739,13 +16739,15 @@ async function urlToBuiltUrl(url, importer, config, pluginContext, shouldInline)
|
|
16739
16739
|
// skip public check since we just did it above
|
16740
16740
|
true, shouldInline);
|
16741
16741
|
}
|
16742
|
+
const nestedQuotesRE = /"[^"']*'[^"]*"|'[^'"]*"[^']*'/;
|
16742
16743
|
// Inspired by https://github.com/iconify/iconify/blob/main/packages/utils/src/svg/url.ts
|
16743
16744
|
function svgToDataURL(content) {
|
16744
16745
|
const stringContent = content.toString();
|
16745
16746
|
// If the SVG contains some text or HTML, any transformation is unsafe, and given that double quotes would then
|
16746
16747
|
// need to be escaped, the gain to use a data URI would be ridiculous if not negative
|
16747
16748
|
if (stringContent.includes('<text') ||
|
16748
|
-
stringContent.includes('<foreignObject')
|
16749
|
+
stringContent.includes('<foreignObject') ||
|
16750
|
+
nestedQuotesRE.test(stringContent)) {
|
16749
16751
|
return `data:image/svg+xml;base64,${content.toString('base64')}`;
|
16750
16752
|
}
|
16751
16753
|
else {
|
@@ -40076,8 +40078,8 @@ function createCachedImport(imp) {
|
|
40076
40078
|
return cached;
|
40077
40079
|
};
|
40078
40080
|
}
|
40079
|
-
const importPostcssImport = createCachedImport(() => import('./dep-
|
40080
|
-
const importPostcssModules = createCachedImport(() => import('./dep-
|
40081
|
+
const importPostcssImport = createCachedImport(() => import('./dep-TyoTMUQy.js').then(function (n) { return n.i; }));
|
40082
|
+
const importPostcssModules = createCachedImport(() => import('./dep-mc9zj7Ue.js').then(function (n) { return n.i; }));
|
40081
40083
|
const importPostcss = createCachedImport(() => import('postcss'));
|
40082
40084
|
/**
|
40083
40085
|
* @experimental
|
@@ -59135,7 +59137,7 @@ const processNodeUrl = (url, useSrcSetReplacer, config, htmlPath, originalUrl, s
|
|
59135
59137
|
}
|
59136
59138
|
if (server && shouldPreTransform(url, config)) {
|
59137
59139
|
let preTransformUrl;
|
59138
|
-
if (url[0] === '/') {
|
59140
|
+
if (url[0] === '/' && url[1] !== '/') {
|
59139
59141
|
preTransformUrl = url;
|
59140
59142
|
}
|
59141
59143
|
else if (url[0] === '.' || isBareRelative(url)) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-
|
1
|
+
import { z as commonjsGlobal, y as getDefaultExportFromCjs } from './dep-R0I0XnyH.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-R0I0XnyH.js';
|
6
6
|
import { VERSION } from './constants.js';
|
7
7
|
import 'node:fs/promises';
|
8
8
|
import 'node:url';
|
@@ -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-R0I0XnyH.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-R0I0XnyH.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-R0I0XnyH.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-R0I0XnyH.js').then(function (n) { return n.D; });
|
897
897
|
try {
|
898
898
|
const server = await preview({
|
899
899
|
root,
|
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-R0I0XnyH.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-R0I0XnyH.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';
|