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

Fix with-polyfills example for Next 5 (#3740)

This commit is contained in:
Tim Teeling 2018-02-09 03:31:30 -05:00 committed by Tim Neutkens
parent 73bf0ab162
commit 1b473e478d

View file

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