Conversation
Add TabItem for .mts files and include note about ESM syntax support in Vite configuration.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
|
After reviewing the source PR (strapi/strapi#25238) and checking the Vite documentation and Strapi codebase, here are some concerns about the third "TypeScript (ESM)" tab: The code is identical across the TypeScript and TypeScript (ESM) tabs. The only difference is the filename ( The claim "CJS is being phased out by Vite" is misleading. The official Vite config docs (vite.dev/config) still recommend Potential loader issue in Strapi. The Proposed changes:
|
The TypeScript (ESM) tab had identical code to the TypeScript tab. A short tip is sufficient to mention .mts support for users who need explicit ESM module resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Correction to my earlier comment: Vite 6 does deprecate the CJS Node API (see Vite 6 troubleshooting), so the direction is real. However, Strapi currently ships with Vite 5.4.21, where CJS is not deprecated. The |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Now fully approved ✅ |
.mts ESM syntax support
This PR updates documentation based on strapi/strapi#25238.
Adds a new TabItem example showing .mts ESM syntax for Vite configuration, along with a note explaining that ESM syntax is now supported and recommended.
Generated automatically by the docs self-healing workflow (micro-edit, Haiku).
Review before merging.