An esbuild plugin that enables importing all files from a folder dynamically, treating them as if they were imported individually. This plugin is at version 1.0.1, stable, and ships TypeScript types. It simplifies bulk imports for esbuild-based projects, offering a declarative way to include multiple files from a directory without manual import statements. Unlike similar solutions that rely on glob patterns or require resolution, this plugin integrates directly with esbuild's build process. It supports only ESM projects and requires esbuild >= 0.17.0. Use cases include loading all components, assets, or modules in a directory with a single import statement.
npm install esbuild-plugin-import-folderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic setup of esbuild-plugin-import-folder to import all files from a directory.
Ensure project uses ESM ("type": "module" in package.json) and update esbuild to v0.17+.Be selective with the directory or use filter options if available.
Update to 1.0.0+ and use default import or named 'importFolderPlugin'.
Ensure to pass a valid directory path in the options object: importFolderPlugin({ directory: './path/to/dir' })Change to import statement: import importFolderPlugin from 'esbuild-plugin-import-folder'
Install the package: npm install esbuild-plugin-import-folder
No dependency data recorded yet.