A Rollup plugin that resolves local files with custom extensions (e.g., .tsx, .ts, .jsx). Version 0.1.0 is the only release; it is in early development with no test suite. Unlike rollup-plugin-node-resolve, it avoids resolving node_modules entirely, focusing solely on adding extension support for local imports. It is primarily intended for building packages where you control the dependency graph, and it automatically resolves index files based on the provided extensions.
npm install rollup-plugin-extensionsVerified import paths — ran on the pinned version, not inferred.
Shows a basic Rollup configuration using rollup-plugin-extensions to resolve TypeScript and JSX files locally.
Provide an extensions array with desired extensions.
Avoid combining with rollup-plugin-node-resolve unless you understand the conflict.
Use with caution and test your build thoroughly.
Use another plugin like rollup-plugin-alias for absolute imports.
Change import to import extensions from 'rollup-plugin-extensions'.
Add the missing extension (e.g., '.ts') to the extensions array in the plugin configuration.
Install the plugin (yarn add -D rollup-plugin-extensions) and add it to the plugins array.