Socket
Socket
Sign inDemoInstall

react-native-svg-web

Package Overview
Dependencies
34
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-svg-web

A web replacement for react-native-svg


Version published
Weekly downloads
10K
decreased by-21.17%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-svg-web

npm version downloads

This package can be used as a drop-in replacement for react-native-svg when targeting the web, or as a mock for jest when testing react-native applications.

Targeting the Web

Add the following to your webpack configuration:

module.exports = {
  ..., /* the existing configuration */

  resolve: {
    alias: {
      'react-native-svg': 'react-native-svg-web'
    }
  }
};

Mocking with Jest

Add the following to your package.json.

{
  "jest": {
    "setupFiles": [
      "./jest/mocks/react-native-svg.js"
    ]
  }
};

And then create a file ./jest/mocks/react-native-svg.js:

jest.mock('react-native-svg', () => require('react-native-svg-web'));

Keywords

FAQs

Last updated on 03 Jun 2020

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc