vite 8.0.0-beta.3 → 8.0.0-beta.5
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.
|
@@ -9,7 +9,7 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
9
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
10
|
var __esmMin = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
11
11
|
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
12
|
-
var
|
|
12
|
+
var __exportAll = (all, symbols) => {
|
|
13
13
|
let target = {};
|
|
14
14
|
for (var name in all) {
|
|
15
15
|
__defProp(target, name, {
|
|
@@ -45,4 +45,4 @@ var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeM
|
|
|
45
45
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
|
-
export { __toCommonJS as a, __require as i, __esmMin as n, __toDynamicImportESM as o,
|
|
48
|
+
export { __toCommonJS as a, __require as i, __esmMin as n, __toDynamicImportESM as o, __exportAll as r, __toESM as s, __commonJSMin as t };
|
package/dist/node/chunks/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toDynamicImportESM, r as
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toDynamicImportESM, r as __exportAll, s as __toESM, t as __commonJSMin } from "./chunk.js";
|
|
2
2
|
import { A as OPTIMIZABLE_ENTRY_RE, C as ERR_FILE_NOT_FOUND_IN_OPTIMIZED_DEP_DIR, D as JS_TYPES_RE, E as FS_PREFIX, F as defaultAllowedOrigins, I as loopbackHosts, L as wildcardHosts, M as SPECIAL_QUERY_RE, N as VERSION, O as KNOWN_ASSET_TYPES, P as VITE_PACKAGE_DIR, R as require_picocolors, S as ENV_PUBLIC_PATH, T as ESBUILD_BASELINE_WIDELY_AVAILABLE_TARGET, _ as DEFAULT_SERVER_CONDITIONS, a as CLIENT_ENTRY, b as DEV_PROD_CONDITION, c as DEFAULT_ASSETS_INLINE_LIMIT, d as DEFAULT_CLIENT_MAIN_FIELDS, f as DEFAULT_CONFIG_FILES, g as DEFAULT_PREVIEW_PORT, h as DEFAULT_EXTERNAL_CONDITIONS, i as CLIENT_DIR, j as ROLLUP_HOOKS, k as METADATA_FILENAME, l as DEFAULT_ASSETS_RE, m as DEFAULT_EXTENSIONS, n as createLogger, o as CLIENT_PUBLIC_PATH, p as DEFAULT_DEV_PORT, r as printServerUrls, s as CSS_LANGS_RE, t as LogLevels, u as DEFAULT_CLIENT_CONDITIONS, v as DEFAULT_SERVER_MAIN_FIELDS, w as ERR_OPTIMIZE_DEPS_PROCESSING_ERROR, x as ENV_ENTRY, y as DEP_VERSION_RE } from "./logger.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import { parseAst, parseAstAsync } from "rolldown/parseAst";
|
|
@@ -1061,7 +1061,7 @@ var init_core = __esmMin((() => {}));
|
|
|
1061
1061
|
|
|
1062
1062
|
//#endregion
|
|
1063
1063
|
//#region ../../node_modules/.pnpm/obug@1.0.2_ms@2.1.3/node_modules/obug/dist/node.js
|
|
1064
|
-
var node_exports = /* @__PURE__ */
|
|
1064
|
+
var node_exports = /* @__PURE__ */ __exportAll({
|
|
1065
1065
|
createDebug: () => createDebug,
|
|
1066
1066
|
default: () => node_default,
|
|
1067
1067
|
formatArgs: () => formatArgs,
|
|
@@ -4644,7 +4644,7 @@ function hasESMSyntax(code, opts = {}) {
|
|
|
4644
4644
|
}
|
|
4645
4645
|
|
|
4646
4646
|
//#endregion
|
|
4647
|
-
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.
|
|
4647
|
+
//#region ../../node_modules/.pnpm/@rolldown+pluginutils@1.0.0-beta.57/node_modules/@rolldown/pluginutils/dist/filter/simple-filters.js
|
|
4648
4648
|
/**
|
|
4649
4649
|
* Constructs a RegExp that matches the exact string specified.
|
|
4650
4650
|
*
|
|
@@ -23603,7 +23603,15 @@ const esMap = {
|
|
|
23603
23603
|
"chrome110",
|
|
23604
23604
|
"edge110",
|
|
23605
23605
|
"safari16.4",
|
|
23606
|
+
"firefox146",
|
|
23606
23607
|
"opera96"
|
|
23608
|
+
],
|
|
23609
|
+
2024: [
|
|
23610
|
+
"chrome119",
|
|
23611
|
+
"edge119",
|
|
23612
|
+
"safari17.4",
|
|
23613
|
+
"firefox145",
|
|
23614
|
+
"opera105"
|
|
23607
23615
|
]
|
|
23608
23616
|
};
|
|
23609
23617
|
const esRE = /es(\d{4})/;
|
|
@@ -30090,7 +30098,7 @@ function workerImportMetaUrlPlugin(config) {
|
|
|
30090
30098
|
async handler(code, id) {
|
|
30091
30099
|
let s;
|
|
30092
30100
|
const cleanString = stripLiteral(code);
|
|
30093
|
-
const workerImportMetaUrlRE$1 = /\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s
|
|
30101
|
+
const workerImportMetaUrlRE$1 = /\bnew\s+(?:Worker|SharedWorker)\s*\(\s*(new\s+URL\s*\(\s*('[^']+'|"[^"]+"|`[^`]+`)\s*,\s*import\.meta\.url\s*(?:,\s*)?\))/dg;
|
|
30094
30102
|
let match;
|
|
30095
30103
|
while (match = workerImportMetaUrlRE$1.exec(cleanString)) {
|
|
30096
30104
|
const [[, endIndex], [expStart, expEnd], [urlStart, urlEnd]] = match.indices;
|
|
@@ -32284,10 +32292,8 @@ function rolldownDepPlugin(environment, qualified, external) {
|
|
|
32284
32292
|
scan: true,
|
|
32285
32293
|
packageCache: cjsPackageCache
|
|
32286
32294
|
});
|
|
32287
|
-
const resolve$4 = (id, importer, kind
|
|
32288
|
-
|
|
32289
|
-
if (resolveDir) _importer = normalizePath(path.join(resolveDir, "*"));
|
|
32290
|
-
else if (importer) _importer = importer in qualified ? qualified[importer] : importer;
|
|
32295
|
+
const resolve$4 = (id, importer, kind) => {
|
|
32296
|
+
const _importer = importer && importer in qualified ? qualified[importer] : importer;
|
|
32291
32297
|
return (kind.startsWith("require") ? _resolveRequire : _resolve)(environment, id, _importer);
|
|
32292
32298
|
};
|
|
32293
32299
|
const resolveResult = (id, resolved) => {
|
|
@@ -35890,6 +35896,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
35890
35896
|
const filenameVarName = "__vite_injected_original_filename";
|
|
35891
35897
|
const importMetaUrlVarName = "__vite_injected_original_import_meta_url";
|
|
35892
35898
|
const importMetaResolveVarName = "__vite_injected_original_import_meta_resolve";
|
|
35899
|
+
const importMetaResolveRegex = /import\.meta\s*\.\s*resolve/;
|
|
35893
35900
|
const bundle = await rolldown({
|
|
35894
35901
|
input: fileName,
|
|
35895
35902
|
platform: "node",
|
|
@@ -35946,7 +35953,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
35946
35953
|
filter: { id: /\.[cm]?[jt]s$/ },
|
|
35947
35954
|
async handler(code, id) {
|
|
35948
35955
|
let injectValues = `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};`;
|
|
35949
|
-
if (
|
|
35956
|
+
if (importMetaResolveRegex.test(code)) if (isESM) {
|
|
35950
35957
|
if (!importMetaResolverRegistered) {
|
|
35951
35958
|
importMetaResolverRegistered = true;
|
|
35952
35959
|
await createImportMetaResolver();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite",
|
|
3
|
-
"version": "8.0.0-beta.
|
|
3
|
+
"version": "8.0.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Evan You",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"lightningcss": "^1.30.2",
|
|
66
66
|
"picomatch": "^4.0.3",
|
|
67
67
|
"postcss": "^8.5.6",
|
|
68
|
-
"rolldown": "1.0.0-beta.
|
|
68
|
+
"rolldown": "1.0.0-beta.57",
|
|
69
69
|
"tinyglobby": "^0.2.15"
|
|
70
70
|
},
|
|
71
71
|
"optionalDependencies": {
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"@jridgewell/trace-mapping": "^0.3.31",
|
|
78
78
|
"@oxc-project/types": "0.103.0",
|
|
79
79
|
"@polka/compression": "^1.0.0-next.25",
|
|
80
|
-
"@rolldown/pluginutils": "1.0.0-beta.
|
|
80
|
+
"@rolldown/pluginutils": "1.0.0-beta.57",
|
|
81
81
|
"@rollup/plugin-alias": "^5.1.1",
|
|
82
82
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
83
83
|
"@rollup/plugin-dynamic-import-vars": "2.1.4",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"postcss-modules": "^6.0.1",
|
|
118
118
|
"premove": "^4.0.0",
|
|
119
119
|
"resolve.exports": "^2.0.3",
|
|
120
|
-
"rolldown-plugin-dts": "^0.
|
|
120
|
+
"rolldown-plugin-dts": "^0.20.0",
|
|
121
121
|
"rollup": "^4.43.0",
|
|
122
122
|
"rollup-plugin-license": "^3.6.0",
|
|
123
123
|
"sass": "^1.96.0",
|