Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-app-rewire-lingui

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-app-rewire-lingui

Add jsLingui babel plugins to create-react-app using react-app-rewired

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

react-app-rewire-lingui

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

Installation

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

Usage

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);
};

Usage with Storybook

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);
};

License

Licensed under the MIT License, Copyright ©️ 2018 Andrej Badin. See LICENSE.md for more information.

Keywords

FAQs

Package last updated on 10 May 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc