Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>index-defaultsNew to Visual Studio Code? Get it now.
index-defaults

index-defaults

a-type

|
910 installs
| (0) | Free
Generates an index file which exports defaults from the current directory by name
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

index-defaults

Generates an index file within a source code directory that simply re-exports all default exports of adjacent modules as named exports.

Features

Right click a directory in the Explorer and select "Index default exports in this directory".

An index.js file will be created in that directory which re-exports default exports from all files and directories within the directory you specified.

For instance, if your structure looks like this:

code
|
+- Foo/
+- bar.js
+- baz.tsx

The extension will create a file code/index.js with the following content:

export { default as Foo } from './Foo';
export { default as bar } from './bar';
export { default as baz } from './baz';

Extension Settings

TODO - support .ts for index, more configurable filters.

Release Notes

Users appreciate release notes as you update your extension.

0.0.1

Initial, minimal working feature. JS index file only. Some non-configurable sane filters.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft