Move extension to webpack-based build to support Typescript sources #78
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR moves the build / development process to support Typescript files.
For now, all JS will work as-is since all valid JavaScript is also valid TypeScript, enabling an incremental adoption of Typescript. But since we need to compile TS sources into JS at build time, webpack is introduced.
Currently, the
main
entrypoint to the extension isout/extension.js
. With webpack added, thenpm run watch
task will use webpack to compile all sources insideout/
into thedist/
folder. Now,dist/extension.ts
is the new entrypoint for the extension.The PR changes the "Run Extension" debug task to automatically launch the
npm run watch
task to ensure that webpack is run continuously throughout the development.It also adds a new debug task to run the extension in an isolated extension host with a temporary settings profile ("Run Extension Isolated"). Note that this requires
workbench.experimental.settings profiles.enabled
to be set totrue
in the developers user settings.