Skip to content

Commit

Permalink
fix: build.transpile guard for nuxt@1.x (fixes #498)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 18, 2021
1 parent 7e4a070 commit 66d56ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ function axiosModule (_moduleOptions) {
}

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

// Default prefix
const prefix = process.env.API_PREFIX || moduleOptions.prefix || '/'
Expand Down

0 comments on commit 66d56ab

Please sign in to comment.