Skip to content

Commit

Permalink
fix(npm/build): special case when fetcher is the only possible argume…
Browse files Browse the repository at this point in the history
…nt (in JS bundle)

previous commit was only for d.ts bundle
  • Loading branch information
Vexcited authored Jul 25, 2024
1 parent baec644 commit e91df67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions npm/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ const WASM = await readFile(pathFromPKG(`${pkg.name}_bg.wasm`));
// Add default fetcher to the fetcher parameter (to make it optional)
content = content.replace(
// Since fetcher parameter is always the last, we can match it that way.
/, fetcher\) {/g,
`, fetcher = utils__defaultFetcher) {`
/fetcher\) {/g,
`fetcher = utils__defaultFetcher) {`
);
console.info("[JS]: Added default fetcher to 'fetcher' parameters.");

Expand Down

0 comments on commit e91df67

Please sign in to comment.