Remove error-debug.js checks as the chunk is removed (#6761)

This code is obsolete as the chunk was removed.
This commit is contained in:
Tim Neutkens 2019-03-23 16:55:44 +01:00 committed by GitHub
parent d24af62140
commit 6716bcbf87
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,14 +37,11 @@ export default class NextJsSsrImportPlugin {
// If the chunk is not part of the pages directory we have to keep the original behavior,
// otherwise webpack will error out when the file is used before the compilation finishes
// this is the case with mini-css-extract-plugin
if (!IS_BUNDLED_PAGE_REGEX.exec(chunk.name) && chunk.name !== 'error-debug.js') {
if (!IS_BUNDLED_PAGE_REGEX.exec(chunk.name)) {
return originalFn(source, chunk)
}
const pagePath = join(outputPath, dirname(chunk.name))
let relativePathToBaseDir = relative(pagePath, join(outputPath, SSR_MODULE_CACHE_FILENAME))
if (chunk.name === 'error-debug.js') {
relativePathToBaseDir = `./${relativePathToBaseDir}`
}
// Make sure even in windows, the path looks like in unix
// Node.js require system will convert it accordingly