From cf8d7743cdf7c6aabc261e9bbeea8efa3f7ebeb9 Mon Sep 17 00:00:00 2001 From: yoyo930021 Date: Tue, 4 Oct 2022 20:20:52 +0800 Subject: [PATCH] refactor(vite): rename --- packages/vite/src/node/plugins/asset.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vite/src/node/plugins/asset.ts b/packages/vite/src/node/plugins/asset.ts index a4f985521db42c..14abf66315b7cb 100644 --- a/packages/vite/src/node/plugins/asset.ts +++ b/packages/vite/src/node/plugins/asset.ts @@ -177,7 +177,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin { id = id.replace(urlRE, '$1').replace(/[?&]$/, '') const url = await fileToUrl(id, config, this) if (isEmitAssetsWithModule) { - return `import img from ${JSON.stringify(url)};export default img;` + return `import asset from ${JSON.stringify(url)};export default asset;` } return `export default ${JSON.stringify(url)}` },