Giter VIP home page Giter VIP logo

Comments (3)

fbartho avatar fbartho commented on June 30, 2024

This is an old issue, I don't think this is a concern anymore. Please message back if we can't rely on ES6+ -- react-native core relies on ES6 these days.

from react-native-parsed-text.

WaldoJeffers avatar WaldoJeffers commented on June 30, 2024

@fbartho This might be an "old" issue, but it's still valid, as you're only exporting an ES6 (with ES6 modules syntax) version, and not a browser-ready bundle. The problem is when you're trying to use your module outside of the Metro bundler context (it's not related to whether React Native uses ES6 internally or not), which by default transpiles node_modules contrary to other bundlers such as Webpack or Rollup.

For other people facing the same issue, you need to instruct Webpack to transpile react-native-parsed-text source code, by adding the following option:
exclude: /node_modules\/(?!(react-native-parsed-text))/,
to your babel-loader configuration.

from react-native-parsed-text.

fbartho avatar fbartho commented on June 30, 2024

React Native Web made some different technical decisions than other libraries such as
https://github.com/vincentriemer/react-native-dom or
https://microsoft.github.io/reactxp

Itโ€™s not clear to me that -web is the winning technical solution here. Adding a whole build tool chain for -web seems like a lot today. But if somebody contributes easy modifications to support it, then that might be okay (rollup). Are you sure you canโ€™t configure your Babel or webpack to conditionally compile your node_modules?

from react-native-parsed-text.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.