mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
Only mangle extension private properties in production builds (#171684)
This speeds up watch-web
This commit is contained in:
@@ -37,6 +37,11 @@ function getMangledFileContents(projectPath) {
|
||||
* @type {webpack.LoaderDefinitionFunction}
|
||||
*/
|
||||
module.exports = async function (source, sourceMap, meta) {
|
||||
if (this.mode !== 'production') {
|
||||
// Only enable mangling in production builds
|
||||
return source;
|
||||
}
|
||||
|
||||
if (source !== fs.readFileSync(this.resourcePath).toString()) {
|
||||
// File content has changed by previous webpack steps.
|
||||
// Skip mangling.
|
||||
|
||||
Reference in New Issue
Block a user