Commit e5657300 authored by JJ Kasper's avatar JJ Kasper Committed by Joe Haddad

Fix package count being zero in some cases (#7812)

contains ignored package name
parent 32080247
...@@ -43,7 +43,7 @@ export function getPageChunks( ...@@ -43,7 +43,7 @@ export function getPageChunks(
if (mod.includes('node_modules/')) { if (mod.includes('node_modules/')) {
if ( if (
mod.match( mod.match(
/(@babel|core-js|styled-jsx|string-hash|object-assign|process|react|react-dom|regenerator-runtime|webpack|node-libs-browser)/ /node_modules\/(@babel|core-js|styled-jsx|string-hash|object-assign|process|react|react-dom|regenerator-runtime|webpack|node-libs-browser)\//
) )
) { ) {
return null return null
......
import fetch from 'isomorphic-unfetch'
console.log(fetch)
export default () => <p>Hello world</p>
/* eslint-env jest */
/* global jasmine */
import { join } from 'path'
import { nextBuild } from 'next-test-utils'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1
const appDir = join(__dirname, '../react-site')
describe('Build Stats Output', () => {
it('Shows correct package count in output', async () => {
const { stdout } = await nextBuild(appDir, undefined, { stdout: true })
expect(stdout).toMatch(/\/something .*?5/)
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment