vite 8.0.0-beta.3 → 8.0.0-beta.4
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/node.js +11 -2
- package/package.json +3 -3
package/dist/node/chunks/node.js
CHANGED
|
@@ -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.56/node_modules/@rolldown/pluginutils/dist/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})/;
|
|
@@ -35890,6 +35898,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
35890
35898
|
const filenameVarName = "__vite_injected_original_filename";
|
|
35891
35899
|
const importMetaUrlVarName = "__vite_injected_original_import_meta_url";
|
|
35892
35900
|
const importMetaResolveVarName = "__vite_injected_original_import_meta_resolve";
|
|
35901
|
+
const importMetaResolveRegex = /import\.meta\s*\.\s*resolve/;
|
|
35893
35902
|
const bundle = await rolldown({
|
|
35894
35903
|
input: fileName,
|
|
35895
35904
|
platform: "node",
|
|
@@ -35946,7 +35955,7 @@ async function bundleConfigFile(fileName, isESM) {
|
|
|
35946
35955
|
filter: { id: /\.[cm]?[jt]s$/ },
|
|
35947
35956
|
async handler(code, id) {
|
|
35948
35957
|
let injectValues = `const ${dirnameVarName} = ${JSON.stringify(path.dirname(id))};const ${filenameVarName} = ${JSON.stringify(id)};const ${importMetaUrlVarName} = ${JSON.stringify(pathToFileURL(id).href)};`;
|
|
35949
|
-
if (
|
|
35958
|
+
if (importMetaResolveRegex.test(code)) if (isESM) {
|
|
35950
35959
|
if (!importMetaResolverRegistered) {
|
|
35951
35960
|
importMetaResolverRegistered = true;
|
|
35952
35961
|
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.4",
|
|
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.56",
|
|
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.56",
|
|
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",
|