mirror of
https://github.com/Microsoft/vscode
synced 2024-07-05 01:08:57 +00:00
Only mangle extension private properties in production builds (#171684)
This speeds up watch-web
This commit is contained in:
parent
d0f0a5659f
commit
d0176b8a87
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user