Skip to content

Commit ff4be08

Browse files
patak-devaleclarson
authored andcommitted
fix: normalize internal plugin names (vitejs#4976)
1 parent 9be0587 commit ff4be08

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

packages/plugin-legacy/index.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function viteLegacyPlugin(options = {}) {
7979
* @type {import('vite').Plugin}
8080
*/
8181
const legacyConfigPlugin = {
82-
name: 'legacy-config',
82+
name: 'vite:legacy-config',
8383

8484
apply: 'build',
8585
config(config) {
@@ -93,7 +93,7 @@ function viteLegacyPlugin(options = {}) {
9393
* @type {import('vite').Plugin}
9494
*/
9595
const legacyGenerateBundlePlugin = {
96-
name: 'legacy-generate-polyfill-chunk',
96+
name: 'vite:legacy-generate-polyfill-chunk',
9797
apply: 'build',
9898

9999
configResolved(config) {
@@ -164,7 +164,7 @@ function viteLegacyPlugin(options = {}) {
164164
* @type {import('vite').Plugin}
165165
*/
166166
const legacyPostPlugin = {
167-
name: 'legacy-post-process',
167+
name: 'vite:legacy-post-process',
168168
enforce: 'post',
169169
apply: 'build',
170170

@@ -449,7 +449,7 @@ function viteLegacyPlugin(options = {}) {
449449
* @type {import('vite').Plugin}
450450
*/
451451
const legacyEnvPlugin = {
452-
name: 'legacy-env',
452+
name: 'vite:legacy-env',
453453

454454
config(config, env) {
455455
if (env) {
@@ -584,7 +584,7 @@ const polyfillId = 'vite/legacy-polyfills'
584584
*/
585585
function polyfillsPlugin(imports) {
586586
return {
587-
name: 'polyfills',
587+
name: 'vite:legacy-polyfills',
588588
resolveId(id) {
589589
if (id === polyfillId) {
590590
return id

packages/plugin-vue-jsx/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function vueJsxPlugin(options = {}) {
4545
let needSourceMap = true
4646

4747
return {
48-
name: 'vue-jsx',
48+
name: 'vite:vue-jsx',
4949

5050
config(config) {
5151
return {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { multilineCommentsRE, singlelineCommentsRE } from '../utils'
1717
*/
1818
export function assetImportMetaUrlPlugin(config: ResolvedConfig): Plugin {
1919
return {
20-
name: 'asset-import-meta-url',
20+
name: 'vite:asset-import-meta-url',
2121
async transform(code, id, ssr) {
2222
if (code.includes('new URL') && code.includes(`import.meta.url`)) {
2323
const importMetaUrlRE =

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import { promises as fs } from 'fs'
22
import { Plugin } from '..'
33
import { cleanUrl } from '../utils'
44

5+
/**
6+
* A plugin to provide build load fallback for arbitrary request with queries.
7+
*/
58
export function loadFallbackPlugin(): Plugin {
69
return {
7-
name: 'load-fallback',
10+
name: 'vite:load-fallback',
811
async load(id) {
912
try {
1013
return fs.readFile(cleanUrl(id), 'utf-8')

0 commit comments

Comments
 (0)