Skip to content

Bundle the extension #41

@asbjornu

Description

@asbjornu

Subject of the feature

According to Microsoft's best practices, VS Code extensions should be bundled.

Problem

When executing vsce package now, the following is written to the console:

This extension consists of 359 files, out of which 193 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension . You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore

The large amount of JavaScript files being packaged is due to the entire node_modules directory being added to the .vsix archive. Bundling will pull every dependency into one large extension.js file, making it possible to ignore the node_modules directory and pretty much everything else, greatly reducing the size of the package.

Alternatives

Webpack is suggested, but I think there are alternative bundlers that may be used. Bundling is unchartered territory for me, so I have no preference.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions