Quick fix to create missing files for unresolved imports in JS/TS projects.
Shows a lightbulb/hover action like “Create file for './utils/api'…” that creates folders and the file (e.g., api.ts, api.js, or index.ts in a directory).
- Detects “Cannot find module …” on relative imports (
./or../). - Offers a Quick Fix to create the file (and parent folders) instantly.
- Lets you pick the extension if the import has no extension (configurable).
Just write your imports; when a module is missing, VS Code/TS server produces a diagnostic and the Quick Fix appears.
VS Code only shows Quick Fixes when there’s a diagnostic. For JS/JSX, enable type checking so the “Cannot find module …” diagnostic appears:
{ "compilerOptions": { "checkJs": true, "allowJs": true, "jsx": "react-jsx" }, "include": ["src"] }
Option A — Per file
// @ts-check
import api from './utils/api'