Skip to content

Commit

Permalink
fix: only replace ".js" at the end of the resolved klona path (#1110)
Browse files Browse the repository at this point in the history
Resolves #1109
  • Loading branch information
rchl committed Mar 15, 2021
1 parent 6fd7343 commit 204d77d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function (userOptions) {

this.nuxt.hook('build:before', () => buildHook(this, options))

this.options.alias['~i18n-klona'] = require.resolve('klona/full').replace('.js', '.mjs')
this.options.alias['~i18n-klona'] = require.resolve('klona/full').replace(/\.js$/, '.mjs')
this.options.router.middleware.push('nuxti18n')
this.options.render.bundleRenderer.directives = this.options.render.bundleRenderer.directives || {}
this.options.render.bundleRenderer.directives.t = i18nExtensionsDirective
Expand Down

0 comments on commit 204d77d

Please sign in to comment.