resolve.extensions

  • Type: string[]
  • Default: ['.ts', '.tsx', '.mjs', '.js', '.jsx', '.json']

Automatically resolve file extensions when importing modules. This means you can import files without explicitly writing their extensions.

Info

The usage of this configuration item is exactly the same as that of Rsbuild. For detailed information, please refer to Rsbuild - resolve.extensions.

Warning

Do not enable this configuration option for SSR applications, as it will cause SSR rendering to fail.