Is there a simple replacement for @providesModule?
See original GitHub issueDo you want to request a feature or report a bug?
Feature request, I think?
What is the current behavior?
I can no longer import myClass from "MyClass";
where said class contains @providesModule myClass
.
I’m not sure if this is the right place to ask, but a commenter over in this issue suggested to ask the Metro team. I’ve used @providesModule
since I started with React Native (~3 years ago) and now have a massive project. I’m looking to upgrade to the latest React Native version, but since @providesModule
has been removed I’m not sure how to migrate my code base, short of modifying thousands of import statements.
Is there a way to easily enable this type of functionality?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
HttpApplication.RegisterModule(Type) Method (System.Web ...
The type of the module. ... Provides module initialization and disposal events to the implementing class. ... Discover how to replace machineKey in...
Read more >ios - @providesModule naming collision error - Stack Overflow
The error is saying something about naming collisions. I already tried deleting the collisioned files but another file happens to occur. Then delete...
Read more >pubkey/rxdb - Gitter
Hi, I put 2 image attachments to doc from PC, than I get back on my phone, it work exactly, than I replace...
Read more >API - esbuild
#Simple options. #Alias. Supported by: Build. This feature lets you substitute one package for another when bundling. The example below substitutes the package ......
Read more >Blackboard Ally - NILE & Other Technology Guides
Blackboard Ally is easy to use, it is available in every module site and provides module tutors with quick fixes, inline guidance on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, that branch linked in my previous comment has been updated and is now a full working example!
Thanks Rubén, I wasn’t able to find detailed documentation on this, but I see the property now specified in the Metro documentation. I’ll take a look.
Sent from my iPhone
On Dec 17, 2018, at 8:32 AM, Rubén Norte <notifications@github.commailto:notifications@github.com> wrote:
We removed the support for @providesModule by default but you can use global modules the same way using the option. You can see an example here: https://github.com/facebook/metro/blob/cdc9cbe89c9966a25314cc13971e547c12e9227a/packages/metro/src/DeltaBundler/__fixtures__/hasteImpl.js
I recommend you not to read the file to get the haste name from the @providesModule tag but extract it from the file name, as we do now at Facebook.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/facebook/metro/issues/334#issuecomment-447908673, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABIJWgH_QbZO7qeeFw70JZTEj_VYk5Toks5u58csgaJpZM4ZVlwt.