Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-app-rewire-lingui
Advanced tools
Add jsLingui babel plugins to create-react-app using react-app-rewired
Add jsLingui babel plugins to create-react-app using react-app-rewired
This package adds @lingui/babel-plugin-transform-js
and @lingui/babel-plugin-transform-react
to you app via react-app-rewired
npm
npm install --save-dev react-app-rewire-lingui
// these peer dependencies are required, you should add them on your own.
npm install --save-dev @lingui/babel-plugin-transform-js @lingui/babel-plugin-transform-react
Yarn
yarn add --dev react-app-rewire-lingui
// these peer dependencies are required, you should add them on your own.
yarn add --dev @lingui/babel-plugin-transform-js @lingui/babel-plugin-transform-react
In the config-overrides.js
you created for react-app-rewired
add this code:
const { rewireLingui } = require('react-app-rewire-lingui');
/* config-overrides.js */
module.exports = function override(config, env) {
return rewireLingui(config, env);
}
If you are using compose
utility provided by react-app-rewired
to add multiple rewires, use this code:
const { compose } = require('react-app-rewired');
const { createLinguiRewire } = require('react-app-rewire-lingui');
/* config-overrides.js */
module.exports = function override(config, env) {
const rewires = compose(
createRewireForSomeOtherPlugin(),
createRewireEvenFormMorePlugins(),
createLinguiRewire(),
);
return rewires(config, env);
};
When using @storybooks/storybook
with CRA via getstorybook
, create a webpack.config.js
file in .storybook
folder and add this code:
const { rewireLingui } = require('react-app-rewire-lingui');
module.exports = function override(config, env) {
return rewireLingui(config, env);
};
Licensed under the MIT License, Copyright ©️ 2018 Andrej Badin. See LICENSE.md for more information.
FAQs
Add jsLingui babel plugins to create-react-app using react-app-rewired
The npm package react-app-rewire-lingui receives a total of 0 weekly downloads. As such, react-app-rewire-lingui popularity was classified as not popular.
We found that react-app-rewire-lingui demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.