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:
parent
73bf0ab162
commit
1b473e478d
|
@ -3,7 +3,11 @@ module.exports = {
|
||||||
const originalEntry = cfg.entry
|
const originalEntry = cfg.entry
|
||||||
cfg.entry = async () => {
|
cfg.entry = async () => {
|
||||||
const entries = await originalEntry()
|
const entries = await originalEntry()
|
||||||
entries['main.js'].unshift('./client/polyfills.js')
|
|
||||||
|
if (entries['main.js']) {
|
||||||
|
entries['main.js'].unshift('./client/polyfills.js')
|
||||||
|
}
|
||||||
|
|
||||||
return entries
|
return entries
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue