fix: capture the promise global to avoid userland mutation (#20925)

This commit is contained in:
Samuel Attard 2019-11-04 11:16:51 -08:00 committed by GitHub
parent 4de04da27a
commit 267821831c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 39 additions and 2 deletions

View file

@ -74,7 +74,10 @@ module.exports = ({
global: ['@electron/internal/renderer/webpack-provider', '_global'],
Buffer: ['@electron/internal/renderer/webpack-provider', 'Buffer'],
})
] : [])
] : []),
new webpack.ProvidePlugin({
Promise: ['@electron/internal/common/webpack-globals-provider', 'Promise'],
}),
]
})
}
}