ESBuild plugin that resolves shortcuted paths for Svelte components, allowing imports without '.svelte' extension and folder/file name matching. Current stable version is 0.1.4, released in May 2022. It respects path aliases from tsconfig/jsconfig. Differentiators: specifically for esbuild (not webpack/vite), requires capital-letter last path segment to trigger resolution, and supports custom extensions for other frameworks like Malina.
npm install esbuild-svelte-pathsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to install and configure the plugin in an esbuild script, placing it before the Svelte compiler plugin.
Ensure the order: sveltePaths() first, then sveltePlugin().
Use capital letter for the component name in the import path, e.g., import Button from './Button'.
Use explicit full paths if you need IDE navigation support.
Move sveltePaths() before any Svelte compiler plugin in the plugins array.
Ensure the last segment of the import path starts with a capital letter, e.g., './Component'.
Install esbuild-svelte-paths and add it to the plugins array before the Svelte plugin.
No dependency data recorded yet.