Use Webpack in production mode for releases#1963
Conversation
This will set the `mode` of Webpack to `production` for release builds. It will also stop inlining the sourcemap and instead produce a separate file which is excluded by `.vscodeignore`. In terms of the bundled extension, this will add 1 file (`out/webview.js.LICENSE.txt`). It decreases the size of the VSIX file from 4.28MB to 1.77MB.
charisk
left a comment
There was a problem hiding this comment.
The change LGTM (although I've not tested at all).
I'd be keen to hear from previous folks (e.g. @aeisenberg) why we were using dev mode. Perhaps there was a reason, not just tech debt?
|
The main reason was for debugging. When a user has an error, they can send their stack traces to us and we can more easily debug. We found it quite helpful in the past, but of course it adds to the size of the extension. It's up to you all what you want to do. |
To allow us to reconstruct a stack trace, this will upload the sourcemaps for all release builds.
Thanks for adding some context! I've pushed a commit that will upload the sourcemaps on release builds. This should still allow us to reconstruct the stack trace, even if we're building in production mode. |
This will set the
modeof Webpack toproductionfor release builds. It will also stop inlining the sourcemap and instead produce a separate file which is excluded by.vscodeignore.In terms of the bundled extension, this will add 1 file (
out/webview.js.LICENSE.txt). It decreases the size of the VSIX file from 4.28MB to 1.77MB.Checklist
ready-for-doc-reviewlabel there.