next.js
ec560204 - Put native TS resolver for next config under `--experimental-next-config-strip-types` flag (#84675)

Commit
105 days ago
Put native TS resolver for next config under `--experimental-next-config-strip-types` flag (#84675) Using Node.js native TS resolution is great. However, enabling by default can be frustrating for the users as it has restrictions, such as requiring a file extension for imports, and does not read tsconfig.json (no import alias). It also emits a warning when using `next.config.ts` on a CommonJS project, which is the majority of the apps: ``` (node:68710) [MODULE_TYPELESS_PACKAGE_JSON] Warning: Module type of file:///.../next.config.ts is not specified and it doesn't parse as CommonJS. Reparsing as ES module because module syntax was detected. This incurs a performance overhead. To eliminate this warning, add "type": "module" to /.../package.json. (Use `node --trace-warnings ...` to show where the warning was created) ``` Therefore, put this under an `--experimental-next-config-strip-types` flag for now.
Author
Parents
Loading