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

Add export of homepage when exporting without exportPathMap (#4253)

This commit is contained in:
Tim Neutkens 2018-05-02 10:37:52 -07:00 committed by GitHub
parent 62f9736ca3
commit 02bcfb21c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,10 @@ export default class PagesManifestPlugin {
pages[`/${pagePath.replace(/\\/g, '/')}`] = name pages[`/${pagePath.replace(/\\/g, '/')}`] = name
} }
if (typeof pages['/index'] !== 'undefined') {
pages['/'] = pages['/index']
}
compilation.assets[PAGES_MANIFEST] = new RawSource(JSON.stringify(pages)) compilation.assets[PAGES_MANIFEST] = new RawSource(JSON.stringify(pages))
callback() callback()
}) })