question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

react-intl dont rebuild messages during build

See original GitHub issue

Examples bug report

Example name

with-react-intl

Describe the bug

.babelrc file has this option

    "production": {
      "plugins": [
        ["react-intl", {
          "messagesDir": "lang/.messages/"
        }]
      ]
    }

During the build this will gather all translations in this directory (lang/.messages/). But If I delete these files and run the build again they will be not generated again until I edit some components (then messages will be gathered only for the edited component) or change messagesDir option to point to a different folder.

To Reproduce

  1. Get with-react-intl example
  2. Run build
  3. Delete lang/.messages/ folder
  4. Run build again

Expected behavior

Messages should be generated during every build.

System information

  • Version of Next.js: triyed with 8.1.0 and 8.1.1-canary.52

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mikdatdogrucommented, Jun 24, 2019
.next
node_modules/.cache
lang/.message

you’re trying to delte all of theese directory and build again, right?

0reactions
balazsorban44commented, Jan 31, 2022

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-intl dont rebuild messages during build #7616 - GitHub
During the build this will gather all translations in this directory ( lang/.messages/ ). But If I delete these files and run the...
Read more >
Why does defineMessages from react-intl throw an error when ...
My goal is to store the base string (English) in some sort of JSON files outside the components so they can be edited...
Read more >
React Intl: Internationalize your React apps - LogRocket Blog
With the React Intl library, learn how to internationalize any React project to seamlessly change language and currency within web apps.
Read more >
React Internationalization – How To — Smashing Magazine
Restart nodemon and you should see that a build/messages folder has been created in the project's root, with some folders and files inside...
Read more >
React and Drupal 8 with JSON API 3/3 - Colorfield
This one focuses on translation issues and various pitfalls that you might encounter while building with React and Drupal.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found