metro
minimatch
Our great sponsors
metro | minimatch | |
---|---|---|
16 | 5 | |
5,054 | 3,213 | |
0.9% | - | |
9.4 | 4.7 | |
7 days ago | 22 days ago | |
JavaScript | JavaScript | |
MIT License | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
metro
-
Dynamic imports supported in react native
For details on the implementation you can see Evan's PR to metro here.
- React Native bundler improvement! 🔥
-
React vs React Native: How Different Are They, Really?
Some development tools for the web are similar (Chrome debugger, mostly) to those for React Native, but other aspects are very different (working with the metro bundler, using Flipper, AsyncStorage debugging, more). Some techniques developers will use are the same (breakpoints and console logging), but others are different (knowing when to restart the packager vs reinstall the app on device).
-
Setting up React Native Monorepo with Yarn Workspaces
We’re almost done with setting up the project. The last thing in the React Native app is to add watchFolders so metro knows where the linked node_modules are. The shared modules are symlinked by yarn, and since metro doesn’t follow symlinks we need to explicitly say it where the linked node_modules are.
-
Debugging RN + Expo bare using WebStorm? Would I be better off just killing myself now?
Unfortunately it is what it is... I use intellij instead of webstorm since they're the same thing basically. I spent a shitton of time figuring out how to link a local package i was creating for my app only to discover about this issue that is almost as old as react native itself. (luckily there's rnx-kit that solves the problem). Not to talk about the impossibility to have one goddamn IDE to write both typescript, java and c++. Currently i have to write ts/js in intellij, then i have to switch to android studio to write java/c++.
-
Do you know where the __DEV__ flag is set?
React Native packager. Override instructions here.
-
React Native Monorepo
React Native doesn't play nicely with most monorepo tools out of the box as Metro doesn't support symlinking.
-
Running React Native everywhere: The Web
Because React Native for Web is a React website, you can use front-end tools to build and run it. For example, you can build it with Webpack or Rollup instead of Metro bundler.
-
Running React Native everywhere: Android & iOS
Before we can run the app, we still need do one more thing: make metro bundler compatible with Yarn workspaces' hoisting.
-
Running React Native everywhere: Yarn Workspaces monorepo
Second, sharing code with other projects (e.g., backend code, web apps) may get complicated. Out-of-the-box, React Native's metro bundler cannot reference code outside of the project's root directory. You can configure it to do so (and we'll do it as well later on). Still, once you do it, you'll also need to ensure dependencies resolution works correctly (to avoid loading two different versions of the same library, for example); which might not be as easy as it may sound.
minimatch
-
New to node.js - is this an API? I have no idea!
It appears to use minimatch.js (https://github.com/isaacs/minimatch) which seems to be a node.js library (?). I want use it to build in some interactivity into my tutorial.
-
Dependencies hell
How regularly devs update their package dependencies? During my practice, this doesn’t happen as often as necessary. Let’s look at create-react-app for example. It has jest as dependency with version 27.4.3, when I wrote this article actual version was 27.5.1. Jest has micromatch package with version 4.0.4 (that was actual version for [email protected]). And micromatch has minimatch package with version 3.0.4. But actual version is 5.0.1, that solve, at least one major security problem.
-
Running React Native everywhere: Yarn Workspaces monorepo
This nohoist section will tell Yarn that the listed dependencies (specified as glob patterns) should be installed in the node_modules directory of each package instead of the root project's one. For now, I just added react, react-dom, and react-native:
-
[AskJS] Any npm packages that implement glob matching of URLs?
minimatch is what you are looking for.
-
Testing Web Components with Karma, Mocha & Chai
Within the configuration file, the configuration code is put together by setting module.exports to point to a function which accepts one argument: the configuration object. Karma also needs to know which testing framework is being used like Jasmine, Mocha, etc. Using frameworks configuration option, we tell Karma we're using Mocha & Chai to write the tests. Then, we have files configuration option which uses the minimatch library to facilitate flexible but concise file expressions so you can easily list all of the files you want to include and exclude. For example in the above code, test/**/*.test.js will include all files with a ".test.js" extension in the test folder.
What are some alternatives?
expo-cli - Tools for creating, running, and deploying universal Expo and React Native apps
ordinary-puzzles-app - Mobile and web puzzle game built with React-Native
webpack - A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows for loading parts of the application on demand. Through "loaders", modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
Testing-WebComponents - Testing Web Components with Karma, Mocha & Chai.
react-native-web - Cross-platform React UI packages
nx - Smart Monorepos · Fast CI
react-native-monorepo-tools - Tools and utils to support a React Native monorepo built with Yarn Workspaces
starter-wctest
craco - Create React App Configuration Override, an easy and comprehensible configuration layer for Create React App.
react-app-rewired - Override create-react-app webpack configs without ejecting
react-native - A framework for building native applications using React