Home > @lynx-js/rspeedy > Resolve > extensions
Resolve.extensions property
Automatically resolve file extensions when importing modules. This means you can import files without explicitly writing their extensions.
Default: ['.ts', '.tsx', '.mjs', '.js', '.jsx', '.json', '.cjs']
For example, if importing './index', Rsbuild will try to resolve using the following order:
-
./index.ts -
./index.tsx -
./index.mjs -
./index.js -
./index.jsx -
./index.json -
./index.cjs
Signature:
Remarks
The difference between resolve.extensions and tools.rspack.resolve.extensions:
resolve.extensions: Completely overrides Rspeedy's default resolution.
tools.rspack.resolve.extensions: Merges with the default configuration using [webpack-merge](https://github.com/survivejs/webpack-merge).

