Skip to content

Commit

Permalink
fix: only transpile defu for client bundle (resolves #501)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 26, 2021
1 parent 3759157 commit ec2eb0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function axiosModule (_moduleOptions) {

// Transpile defu (IE11)
if (nuxt.options.build.transpile /* nuxt 1 */) {
nuxt.options.build.transpile.push('defu')
nuxt.options.build.transpile.push(({ isClient }) => isClient && 'defu')
}

// Default prefix
Expand Down

1 comment on commit ec2eb0a

@kangw3n
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushing none string value on these array will cause issue on older webpack version,
Source: Nuxtjs v2.3.6
where patterns cannot replace a Fn and throw error.

Related issues: #9667

Please review dependencies or raise up a minor version to solve this problem, Thanks.

Please sign in to comment.