1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Prepend polyfills only once (#4643) (#4738)

This commit is contained in:
Brendan Houle 2018-07-06 05:54:16 -04:00 committed by Tim Neutkens
parent 728871b005
commit d7d61d3d4a

View file

@ -4,7 +4,7 @@ module.exports = {
cfg.entry = async () => {
const entries = await originalEntry()
if (entries['main.js']) {
if (entries['main.js'] && !entries['main.js'].includes('./client/polyfills.js')) {
entries['main.js'].unshift('./client/polyfills.js')
}