Comments (4)
As often, talking about a problem help.
I found that this issue is caused by my config of webpack's babel-loader.
I had to go from this
{
test: /.jsx?$/,
loader: 'babel-loader?cacheDir',
exclude: /node_modules/,
},
to
{
test: /.jsx?$/,
loader: 'babel-loader?cacheDirectory&cacheIdentifier='+ Math.random(),
exclude: /node_modules/,
},
Note that
loader: 'babel-loader'
Would also do the trick, but it will give you slower build
from babel-plugin-react-intl.
This makes sense since you're telling babel-loader
to keep a cache around — doing this probably only makes sense in development and shouldn't be used for your prod build.
Since the messages JSON files are derivative they aren't part of the cache key. Not too sure there's a good way around this.
from babel-plugin-react-intl.
@benzen There's a similar discussion here that has more info that you might be able to use: Ognian/react-intl-webpack-plugin#1
from babel-plugin-react-intl.
For Next.js:
from babel-plugin-react-intl.
Related Issues (20)
- react-native HOT 1
- Not working with babel-loader 8.x HOT 4
- Generate Message ID HOT 1
- The "path" argument must be of type string (v2.4.0) HOT 3
- Allow other component names than the build-in ones HOT 4
- plugin does not seem to do anything HOT 1
- Only defineMessages works. FormattedMessage is ignored. HOT 9
- file.log.warn causes TypeError: Cannot read property 'warn' of undefined HOT 3
- Am I supposed to use this plugin to obtain translation files? HOT 3
- Babel 7 support HOT 3
- Error: Cannot find module 'upath' HOT 3
- Cannot find module babel-plugin-react-intl when extracting messages HOT 1
- id containing multiple period would not work.
- [Babel 7] TypeError: Path must be a string. Received undefined HOT 7
- Any option to remove `defaultMessage` field in production? HOT 1
- cache is not working properly HOT 3
- Extracting message by formatMessage directly but defineMessages HOT 1
- Support spread syntax (or expression) for defineMessages
- Plugin does nothing, how to debug? (using with Gatsby) HOT 2
- [React Intl] `undefined()` must be called with an object expression with values that are React Intl Message Descriptors, also defined as object expressions. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-react-intl.