Commit 345efa3e authored by Joe Haddad's avatar Joe Haddad Committed by JJ Kasper

Keep Chunk Hash in Build Output (#10020)

parent dd6406ac
......@@ -172,7 +172,7 @@ export async function printTreeView(
// Re-add `static/` for root files
.replace(/^<buildId>/, 'static')
// Remove file hash
.replace(/[.-][0-9a-z]{20}(?=\.)/, '')
.replace(/[.-]([0-9a-z]{6})[0-9a-z]{14}(?=\.)/, '.$1')
messages.push([
` ${innerSymbol} ${cleanName}`,
......
......@@ -24,8 +24,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/ [ ]* \d{1,} B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)
expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_app')
......@@ -50,8 +50,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/ [ ]* \d{1,} B/)
expect(stdout).toMatch(/\/_app [ ]* \d{1,} B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)
expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_error')
......@@ -77,8 +77,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/amp .* AMP/)
expect(stdout).toMatch(/\/hybrid [ 0-9.]* B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)
expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_error')
......@@ -102,8 +102,8 @@ describe('Build Output', () => {
expect(stdout).toMatch(/\/ [ ]* \d{1,} B/)
expect(stdout).toMatch(/λ \/_error [ ]* \d{1,} B/)
expect(stdout).toMatch(/\+ shared by all [ 0-9.]* kB/)
expect(stdout).toMatch(/ runtime\/main\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.js [ 0-9. ]* kB/)
expect(stdout).toMatch(/ runtime\/main\.[0-9a-z]{6}\.js [ 0-9.]* kB/)
expect(stdout).toMatch(/ chunks\/framework\.[0-9a-z]{6}\.js [ 0-9. ]* kB/)
expect(stdout).not.toContain(' /_document')
expect(stdout).not.toContain(' /_app')
......
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