@vitejs/plugin-legacy
Advanced tools
+15
-8
| import { createRequire } from "node:module"; | ||
| import path$1 from "node:path"; | ||
| import path from "node:path"; | ||
| import crypto from "node:crypto"; | ||
@@ -9,3 +9,3 @@ import { fileURLToPath } from "node:url"; | ||
| //#region rolldown:runtime | ||
| //#region \0rolldown/runtime.js | ||
| var __create = Object.create; | ||
@@ -145,3 +145,3 @@ var __defProp = Object.defineProperty; | ||
| function getBaseInHTML(urlRelativePath, config) { | ||
| return config.base === "./" || config.base === "" ? path$1.posix.join(path$1.posix.relative(urlRelativePath, "").slice(0, -2), "./") : config.base; | ||
| return config.base === "./" || config.base === "" ? path.posix.join(path.posix.relative(urlRelativePath, "").slice(0, -2), "./") : config.base; | ||
| } | ||
@@ -155,3 +155,3 @@ function joinUrlSegments(a, b) { | ||
| function toAssetPathFromHtml(filename, htmlPath, config) { | ||
| const relativeUrlPath = normalizePath(path$1.relative(config.root, htmlPath)); | ||
| const relativeUrlPath = normalizePath(path.relative(config.root, htmlPath)); | ||
| const toRelative = (filename, _hostId) => getBaseInHTML(relativeUrlPath, config) + filename; | ||
@@ -268,3 +268,3 @@ return toOutputFilePathInHtml(filename, "asset", htmlPath, "html", config, toRelative); | ||
| const getLegacyOutputFileName = (fileNames, defaultFileName = "[name]-legacy-[hash].js") => { | ||
| if (!fileNames) return path$1.posix.join(config.build.assetsDir, defaultFileName); | ||
| if (!fileNames) return path.posix.join(config.build.assetsDir, defaultFileName); | ||
| return (chunkInfo) => { | ||
@@ -479,3 +479,3 @@ let fileName = typeof fileNames === "function" ? fileNames(chunkInfo) : fileNames; | ||
| mode, | ||
| root: path$1.dirname(fileURLToPath(import.meta.url)), | ||
| root: path.dirname(fileURLToPath(import.meta.url)), | ||
| configFile: false, | ||
@@ -510,5 +510,12 @@ logLevel: "error", | ||
| ctx.emitFile({ | ||
| type: "asset", | ||
| type: "prebuilt-chunk", | ||
| name: polyfillChunk.name, | ||
| fileName: polyfillChunk.fileName, | ||
| source: polyfillChunk.code | ||
| code: polyfillChunk.code, | ||
| facadeModuleId: polyfillChunk.facadeModuleId ?? void 0, | ||
| isEntry: polyfillChunk.isEntry, | ||
| isDynamicEntry: polyfillChunk.isDynamicEntry, | ||
| exports: [], | ||
| map: polyfillChunk.map ?? void 0, | ||
| sourcemapFileName: polyfillChunk.sourcemapFileName ?? void 0 | ||
| }); | ||
@@ -515,0 +522,0 @@ if (polyfillChunk.sourcemapFileName) { |
+9
-9
| { | ||
| "name": "@vitejs/plugin-legacy", | ||
| "version": "8.0.0-beta.1", | ||
| "version": "8.0.0-beta.2", | ||
| "type": "module", | ||
@@ -31,11 +31,11 @@ "license": "MIT", | ||
| "dependencies": { | ||
| "@babel/core": "^7.28.6", | ||
| "@babel/core": "^7.29.0", | ||
| "@babel/plugin-transform-dynamic-import": "^7.27.1", | ||
| "@babel/plugin-transform-modules-systemjs": "^7.28.5", | ||
| "@babel/preset-env": "^7.28.6", | ||
| "babel-plugin-polyfill-corejs3": "^0.13.0", | ||
| "babel-plugin-polyfill-regenerator": "^0.6.5", | ||
| "@babel/plugin-transform-modules-systemjs": "^7.29.0", | ||
| "@babel/preset-env": "^7.29.0", | ||
| "babel-plugin-polyfill-corejs3": "^0.14.0", | ||
| "babel-plugin-polyfill-regenerator": "^0.6.6", | ||
| "browserslist": "^4.28.1", | ||
| "browserslist-to-esbuild": "^2.1.1", | ||
| "core-js": "^3.47.0", | ||
| "core-js": "^3.48.0", | ||
| "magic-string": "^0.30.21", | ||
@@ -52,4 +52,4 @@ "regenerator-runtime": "^0.14.1", | ||
| "picocolors": "^1.1.1", | ||
| "tsdown": "^0.19.0", | ||
| "vite": "8.0.0-beta.9" | ||
| "tsdown": "^0.20.1", | ||
| "vite": "8.0.0-beta.12" | ||
| }, | ||
@@ -56,0 +56,0 @@ "compatiblePackages": { |
40136
0.71%657
1.08%- Removed
Updated
Updated
Updated