Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
poyoho committed Aug 16, 2022
1 parent f684b78 commit b6083fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/vite/src/node/plugins/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export function registerCustomMime(): void {

export function renderAssetUrl(
ctx: PluginContext,
config: ResolvedConfig,
chunk: RenderedChunk,
code: string,
assetFileName: string,
chunk: RenderedChunk,
config: ResolvedConfig,
hostType: 'js' | 'css' | 'html',
toAssetsRelative?: (
filename: string,
Expand Down Expand Up @@ -179,7 +179,7 @@ export function assetPlugin(config: ResolvedConfig): Plugin {
},

renderChunk(code, chunk) {
const s = renderAssetUrl(this, code, chunk.fileName, chunk, config, 'js')
const s = renderAssetUrl(this, config, chunk, code, chunk.fileName, 'js')
if (s) {
return {
code: s.toString(),
Expand Down
4 changes: 2 additions & 2 deletions packages/vite/src/node/plugins/css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,10 @@ export function cssPostPlugin(config: ResolvedConfig): Plugin {
return (
renderAssetUrl(
this,
config,
chunk,
chunkCSS,
cssAssetName,
chunk,
config,
'css',
toRelative,
(publicUrl) => `${relativePathToPublicFromCSS}/${publicUrl}`
Expand Down

0 comments on commit b6083fb

Please sign in to comment.