Title: module: unflag `--experimental-import-text`? · Issue #67267 · nodejs/node · GitHub
Open Graph Title: module: unflag `--experimental-import-text`? · Issue #67267 · nodejs/node
X Title: module: unflag `--experimental-import-text`? · Issue #67267 · nodejs/node
Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.
Open Graph Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.
X Description: Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub.
Opengraph URL: https://github.com/nodejs/node
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"module: unflag `--experimental-import-text`?","articleBody":"### What is the problem this feature will solve?\n\nText modules (`import text from './file.txt' with { type: 'text' }`) landed in #62300 behind `--experimental-import-text` and are documented as Stability 1.0 (Early development). They have shipped in 26.x and were backported to 24.19.0.\n\nThe flag makes the feature hard to use in practice. Libraries can't rely on it, because they would have to tell every consumer to pass a CLI flag. #65210 also showed that the flag gate affects userland loaders that handle `type: 'text'` themselves. #64992 fixed that, but it's a sign that \"on behind a flag\" and \"off\" are two separate behaviours that loader authors have to keep in mind.\n\nStandards status:\n\n- tc39/proposal-import-text is at Stage 3 (since March 2026).\n- The test262 tests (tc39/test262#4607) and the HTML integration (whatwg/html#11933) have both merged.\n\n### What is the feature you are proposing to solve the problem?\n\nRemove the flag requirement while keeping the feature experimental, following what was done for JSON modules. JSON modules were unflagged in #41736 (v17.5.0) while import assertions were still Stage 3, and were only marked stable in #55333 after the proposal reached Stage 4.\n\nConcretely:\n\n- Stop gating on `--experimental-import-text` in `lib/internal/modules/esm/assert.js` and `lib/internal/modules/esm/get_format.js`.\n- Keep the existing `emitExperimentalWarning('Text import')` in the `text` translator.\n- Turn `--experimental-import-text` into a `NoOp` option, like `--experimental-json-modules`, so existing scripts keep working.\n- Move the docs to Stability 1.1 (Active development).\n- Update the tests: `test-esm-import-text-disabled.mjs` would need to change or be removed.\n\nQuestion for @nodejs/loaders: are there open semantics questions (BOM handling, non-UTF-8 sources, the `text/plain` charset regex in `mimeToFormat`) that should be settled first?\n\nIf there's agreement, I'm happy to send the PR.\n","author":{"url":"https://github.com/pdeveltere","@type":"Person","name":"pdeveltere"},"datePublished":"2026-11-05T03:25:52Z","url":"https://github.com/nodejs/node/issues/67267"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:108f0ba8-4a71-5aa1-0ea1-34e0388e0c40 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1CC:125BB0:4D1176:63AC43:6AED2455 |
| html-safe-nonce | fb881bf034fa7b3cc845ff3c65ff1cf51f451ee4d2877c1b70eb0dd8ecedb46f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUNDOjEyNUJCMDo0RDExNzY6NjNBQzQzOjZBRUQyNDU1IiwidmlzaXRvcl9pZCI6IjUyNzk0ODUyMTkyODg3ODkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6a597fcc1c17d14c584abcb748a556d4d0830c9d0d5850fbc108feaaac08d75d |
| hovercard-subject-tag | repository:27193779 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/issues/67267 |
| twitter:image | https://opengraph.githubassets.com/495326f65e226f3772556773a0910e16c532881a95d78ab4dc86716d0732686f/nodejs/node |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/495326f65e226f3772556773a0910e16c532881a95d78ab4dc86716d0732686f/nodejs/node |
| og:image:alt | Node.js JavaScript runtime ✨🐢🚀✨. Contribute to nodejs/node development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e3e0f7f63e50c6fe879198a93a0a023a648ecc0a5e9bc3b5e033ac57172237e6 |
| turbo-cache-control | no-cache |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 707a24b346ac8a82878b9c084efaa38a997660cb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width