Skip to content

Commit 2f1bf1f

Browse files
committed
chore: use ROLLDOWN_FILE_URL
1 parent bda0b0a commit 2f1bf1f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/vite/src/node/plugins/asset.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const inlineRE: RegExp = /[?&]inline\b/
5656
* - `string`: a URL usable as-is (an inlined `data:` URL, a
5757
* `__VITE_PUBLIC_ASSET__` token, or a bundled-dev output URL).
5858
* - `reference`: an emitted file referenced by its `referenceId`, to be turned
59-
* into `import.meta.ROLLUP_FILE_URL_<referenceId>` (JS) or a `__VITE_ASSET__`
59+
* into `import.meta.ROLLDOWN_FILE_URL_<referenceId>` (JS) or a `__VITE_ASSET__`
6060
* token (CSS/HTML). The `postfix` is the query/hash appended after the URL.
6161
*/
6262
type FileToBuiltUrlResult =
@@ -74,7 +74,7 @@ const assetCache = new WeakMap<Environment, Map<string, FileToBuiltUrlResult>>()
7474

7575
/**
7676
* Emitted asset file names referenced from each chunk (keyed by preliminary
77-
* chunk name) via `import.meta.ROLLUP_FILE_URL_<referenceId>`.
77+
* chunk name) via `import.meta.ROLLDOWN_FILE_URL_<referenceId>`.
7878
*/
7979
const importedAssetsFromFileUrl = new WeakMap<
8080
Environment,
@@ -528,7 +528,7 @@ function formatBuiltAsset(
528528
): string {
529529
if (resolved.type === 'reference') {
530530
if (format === 'js') {
531-
const base = `import.meta.ROLLUP_FILE_URL_${resolved.referenceId}`
531+
const base = `import.meta.ROLLDOWN_FILE_URL_${resolved.referenceId}`
532532
return resolved.postfix
533533
? `${base} + ${JSON.stringify(resolved.postfix)}`
534534
: base

0 commit comments

Comments
 (0)