Skip to content

Commit

Permalink
refactor(vite): rename
Browse files Browse the repository at this point in the history
  • Loading branch information
yoyo930021 committed Feb 10, 2023
1 parent bf17041 commit cf8d774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/plugins/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`
},
Expand Down

0 comments on commit cf8d774

Please sign in to comment.