This PR adds bundling support via webpack so that our extension is
slimmed down to a single .js file for all the source code rather than
multiple js files both for extension source and the source of our
dependencies. This shrinks the generated VSIX file from ~1MB to ~70KB.
Add development time dependencies to webpack and webpack-cli.
Add development time dependency to ts-loader.
Add webpack, webpack-dev and test-compile commands to scripts section in
package.json.
Update main entry point to ./dist/extension in package.json.
Add a webpack.config.js file.
Add a .vscodeignore file that excludes things we do NOT want in the
resulting VSIX.
Add dist directory to .gitignore.
This PR adds bundling support via webpack so that our extension is slimmed down to a single .js file for all the source code rather than multiple js files both for extension source and the source of our dependencies. This shrinks the generated VSIX file from ~1MB to ~70KB.
Details
Per Bundling Extensions;
Add development time dependencies to webpack and webpack-cli. Add development time dependency to ts-loader. Add webpack, webpack-dev and test-compile commands to scripts section in package.json. Update main entry point to ./dist/extension in package.json. Add a webpack.config.js file. Add a .vscodeignore file that excludes things we do NOT want in the resulting VSIX. Add dist directory to .gitignore.