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

Translation files are not copied to build folder #131

Closed
jaysson opened this issue Mar 6, 2024 · 2 comments · Fixed by #132
Closed

Translation files are not copied to build folder #131

jaysson opened this issue Mar 6, 2024 · 2 comments · Fixed by #132
Labels
Type: Bug The issue has indentified a bug

Comments

@jaysson
Copy link

jaysson commented Mar 6, 2024

Package version

2.0.0

Describe the bug

Installed and configured i18n.

npm i @adonisjs/i18n
node ace configure @adonisjs/i18n

Created language file resources/lang/en/crud.json and used it. Everything works fine while running in dev mode.

When I build the app using npm run build, it does not copy the resources/lang folder to build. Note that I am not using edge views, so resources only has lang folder.

I am copying it separately after build for now.

Reproduction repo

No response

@RomainLanz
Copy link
Member

RomainLanz commented Mar 6, 2024

Hey @jaysson! 👋🏻

Thanks for the feedback! It should have been automatically added to the metaFiles key in the adonisrc.ts file.
In the meanwhile, you can add them by hand:

{
  metaFiles: [
    // ...
    {
      pattern: 'resources/lang/**/*.json',
      reloadServer: false
    }
  ]
}

📚 https://docs.adonisjs.com/guides/adonisrc-file#metafile

@RomainLanz RomainLanz added the Type: Bug The issue has indentified a bug label Mar 6, 2024
@jaysson
Copy link
Author

jaysson commented Mar 6, 2024

That was quick! Awesome job @RomainLanz!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue has indentified a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants