-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add watcher.additionalExts option, enable inclusion of .cjs and .mjs …
…files by default Summary: These changes bring spec-compliant support for `.cjs` and `.mjs` module file extensions to Metro. Resolves #535 and replaces D34168944. - Adds a new `watcher.additionalExts` config option to pass additional extensions to the file watcher. This enables Metro to include these in the file map separately from `resolver.sourceExts`, with the effect being to enable new module types that require an explicit file extension when `require`/`import`ed. - Sets the default value for `watcher.additionalExts` to enable explicit resolution of `.cjs` and `.mjs` files by default. Changelog: **[Breaking]** Add `watcher.additionalExts` option, enable inclusion of `.cjs` and `.mjs` files by default (In edge cases, e.g. when both `foo.cjs` and `foo.cjs.js` exist, this changes ordering.) Reviewed By: motiz88 Differential Revision: D37927392 fbshipit-source-id: f71a704dafb720ce38387e222b808ebd9d56b3f4
- Loading branch information
1 parent
a3dc30a
commit c1c6d9c
Showing
9 changed files
with
169 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters