Azure / azure-cosmosdb-ads-extension

Azure Data Studio extension for Azure CosmosDB
MIT License
16 stars 10 forks source link

Bundle with esbuild #70

Closed languy closed 1 year ago

languy commented 1 year ago

This bundles the extension using esbuild.

We're using esbuild --keep-names --minify. The --keep-names option prevents minification from mangling the names which breaks node-fetch package. See this issue related to node-fetch v2.

The output of the compilation (if any) is in out/ and the bunled output is now in dist/. While esbuild transpiles typescript to javascript without the need to call tsc anymore, we still call tsc --noEmit for type checking.

How bundling affects development:

Release build

yarn run publish creates a minified build for production. No sourcemaps are created. Note that the "publish" target invokes "vscode:prepublish" which removes the output folders, performs type/format/link checks, builds the query editor and bundles the extension code.

Debugging extension copied under ADS source code extensions folder and using ADS "Launch Renderer & Debug Renderer And Extension Host" debug target inside VSC

Debugging extension with standard ADS installed