Commit 145c005
[flow][docs] Rename ESM website files to
Summary:
Building the website printed `MODULE_TYPELESS_PACKAGE_JSON` because `website/src/js/flow-check-remark-plugin.js` (and the `initialized-flow-provider.js` it imports) use ES module syntax while sitting in a directory whose `package.json` has no `"type": "module"`. Node has to reparse the file as ESM after first parsing it as CommonJS, which triggers the warning.
The rest of `website/` (`docusaurus.config.js`, `babel.config.js`, `sidebars.js`, `src/js/flow-versions.js`) is CommonJS and is loaded via `require()`, so flipping the whole package to `"type": "module"` would be disruptive. Renaming just the two ESM files to `.mjs` is the targeted fix — Node treats `.mjs` as ESM unambiguously, no warning, no reparse. The dynamic `import()` in `docusaurus.config.js` is updated to point at the new path.
Changelog: [internal]
Reviewed By: marcoww6
Differential Revision: D105734893
fbshipit-source-id: 692b11296ebc9ecda13f7ad2ca529f690e045284.mjs to silence Node warning1 parent 83f7c6f commit 145c005
3 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
File renamed without changes.
0 commit comments