npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@10play/react-native-web-webview

v0.0.3

Published

React Native Web implementation of React Native WebView

Downloads

833

Readme

react-native-web-webview

React Native Web implementation of React Native WebView

Based on https://github.com/react-native-web-community/react-native-web-webview

react-native-web-webview

React Native for Web implementation of RN's WebView

Getting started

Installing

yarna dd react-native-web-webview

The package provides the same functionality as react-native-webview, however, it works when exported as a web project. To continue using the same imports that you do with non-web exports, you you configure an alias in your webpack config so that it resolves to the correct package.

resolve: {
    alias: {
        'react-native': 'react-native-web',
        ...
        'react-native-webview': 'react-native-web-webview',
    }
}

With Expo

When using Expo, you will need to add a webpack file that will be used for web builds in order to add the above code. The following command will create the file in the way expected by Expo and will also install the @expo/webpack-config dependency which is necessary.

npx expo customize webpack.config.js

If you haven't set up Expo to export web projects at all, you will need to install the following dependencies.

npx expo install react-native-web react-dom

Below is an example implementation of webpack.config.js in an expo project.

const createExpoWebpackConfigAsync = require("@expo/webpack-config");

///////
// NOTE: Webpack is only used for bundling web
///////

module.exports = async function (env, argv) {
  const config = await createExpoWebpackConfigAsync(env, argv);

  config.resolve.alias = {
    ...config.resolve.alias,

    // Set up aliases so the web versions are used (Rather than changing imports in each file)
    "react-native": "react-native-web",
    "react-native-webview": "react-native-web-webview",
  };

  // Return the config for use by webpack
  return config;
};