Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when project path contains ".js" #1109

Closed
Labels

Comments

@hrastnik
Copy link

hrastnik commented Mar 15, 2021

Version

nuxt-i18n: 6.21.0
nuxt: all versions

Steps to reproduce

When the project directory path contains ".js" the bundler crashes with the following error:

Dependency not found "~i18n-klona"

The problem is in this line:
https://github.com/nuxt-community/i18n-module/blob/c6580240190e754496c3a6a25a52a46dc1c86c59/src/index.js#L88

The .replace(".js", ".mjs") should replace only the ".js" extension, but instead it replaces the first ".js" it encounters.

@rchl
Copy link
Collaborator

rchl commented Mar 15, 2021

@ghost
Copy link

ghost commented Mar 15, 2021

Wow, that was fast! Thank you for the quick fix.

This was referenced Mar 15, 2021
This was referenced Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment