@@ -62,28 +62,28 @@ module.exports = {
62
62
if ( process . env . TURBOPACK && useLightningcss ) {
63
63
expect ( cssContent ) . toMatchInlineSnapshot ( `
64
64
[
65
- "/_next/static/chunks/test_integration_css-fixtures_single-global_styles_global_04ffe231 .css:
65
+ "/_next/static/chunks/HASH .css:
66
66
.red-text{color:red}",
67
67
]
68
68
` )
69
69
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
70
70
expect ( cssContent ) . toMatchInlineSnapshot ( `
71
71
[
72
- "/_next/static/chunks/test_integration_css-fixtures_single-global_styles_global_04ffe231 .css:
72
+ "/_next/static/chunks/HASH .css:
73
73
.red-text{color:red}",
74
74
]
75
75
` )
76
76
} else if ( useLightningcss ) {
77
77
expect ( cssContent ) . toMatchInlineSnapshot ( `
78
78
[
79
- "/_next/static/css/e6f86e82ed770205 .css:
79
+ "/_next/static/css/HASH .css:
80
80
.red-text{color:red}",
81
81
]
82
82
` )
83
83
} else {
84
84
expect ( cssContent ) . toMatchInlineSnapshot ( `
85
85
[
86
- "/_next/static/css/e6f86e82ed770205 .css:
86
+ "/_next/static/css/HASH .css:
87
87
.red-text{color:red}",
88
88
]
89
89
` )
@@ -146,28 +146,28 @@ module.exports = {
146
146
if ( process . env . TURBOPACK && useLightningcss ) {
147
147
expect ( cssContent ) . toMatchInlineSnapshot ( `
148
148
[
149
- "/_next/static/chunks/aa64a_css-fixtures_single-global-special-characters_a%2Bb_styles_global_238bffda .css:
149
+ "/_next/static/chunks/HASH .css:
150
150
.red-text{color:red}",
151
151
]
152
152
` )
153
153
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
154
154
expect ( cssContent ) . toMatchInlineSnapshot ( `
155
155
[
156
- "/_next/static/chunks/aa64a_css-fixtures_single-global-special-characters_a%2Bb_styles_global_238bffda .css:
156
+ "/_next/static/chunks/HASH .css:
157
157
.red-text{color:red}",
158
158
]
159
159
` )
160
160
} else if ( useLightningcss ) {
161
161
expect ( cssContent ) . toMatchInlineSnapshot ( `
162
162
[
163
- "/_next/static/css/e6f86e82ed770205 .css:
163
+ "/_next/static/css/HASH .css:
164
164
.red-text{color:red}",
165
165
]
166
166
` )
167
167
} else {
168
168
expect ( cssContent ) . toMatchInlineSnapshot ( `
169
169
[
170
- "/_next/static/css/e6f86e82ed770205 .css:
170
+ "/_next/static/css/HASH .css:
171
171
.red-text{color:red}",
172
172
]
173
173
` )
@@ -225,28 +225,28 @@ module.exports = {
225
225
if ( process . env . TURBOPACK && useLightningcss ) {
226
226
expect ( cssContent ) . toMatchInlineSnapshot ( `
227
227
[
228
- "/_next/static/chunks/test_integration_css-fixtures_single-global-src_styles_global_3de272ac .css:
228
+ "/_next/static/chunks/HASH .css:
229
229
.red-text{color:red}",
230
230
]
231
231
` )
232
232
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
233
233
expect ( cssContent ) . toMatchInlineSnapshot ( `
234
234
[
235
- "/_next/static/chunks/test_integration_css-fixtures_single-global-src_styles_global_3de272ac .css:
235
+ "/_next/static/chunks/HASH .css:
236
236
.red-text{color:red}",
237
237
]
238
238
` )
239
239
} else if ( useLightningcss ) {
240
240
expect ( cssContent ) . toMatchInlineSnapshot ( `
241
241
[
242
- "/_next/static/css/e6f86e82ed770205 .css:
242
+ "/_next/static/css/HASH .css:
243
243
.red-text{color:red}",
244
244
]
245
245
` )
246
246
} else {
247
247
expect ( cssContent ) . toMatchInlineSnapshot ( `
248
248
[
249
- "/_next/static/css/e6f86e82ed770205 .css:
249
+ "/_next/static/css/HASH .css:
250
250
.red-text{color:red}",
251
251
]
252
252
` )
@@ -305,7 +305,7 @@ module.exports = {
305
305
if ( process . env . TURBOPACK && useLightningcss ) {
306
306
expect ( cssContent ) . toMatchInlineSnapshot ( `
307
307
[
308
- "/_next/static/chunks/test_integration_css-fixtures_multi-global_styles_e0f6ec64._ .css:
308
+ "/_next/static/chunks/HASH .css:
309
309
.red-text{color:red}
310
310
311
311
@@ -315,7 +315,7 @@ module.exports = {
315
315
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
316
316
expect ( cssContent ) . toMatchInlineSnapshot ( `
317
317
[
318
- "/_next/static/chunks/test_integration_css-fixtures_multi-global_styles_e0f6ec64._ .css:
318
+ "/_next/static/chunks/HASH .css:
319
319
.red-text{color:red}
320
320
321
321
@@ -325,14 +325,14 @@ module.exports = {
325
325
} else if ( useLightningcss ) {
326
326
expect ( cssContent ) . toMatchInlineSnapshot ( `
327
327
[
328
- "/_next/static/css/5e3a80a101f2afdd .css:
328
+ "/_next/static/css/HASH .css:
329
329
.red-text{color:red}.blue-text{color:#00f}",
330
330
]
331
331
` )
332
332
} else {
333
333
expect ( cssContent ) . toMatchInlineSnapshot ( `
334
334
[
335
- "/_next/static/css/52172921917299d1 .css:
335
+ "/_next/static/css/HASH .css:
336
336
.red-text{color:red}.blue-text{color:blue}",
337
337
]
338
338
` )
@@ -391,7 +391,7 @@ module.exports = {
391
391
if ( process . env . TURBOPACK && useLightningcss ) {
392
392
expect ( cssContent ) . toMatchInlineSnapshot ( `
393
393
[
394
- "/_next/static/chunks/test_integration_css-fixtures_nested-global_styles_613f73a3._ .css:
394
+ "/_next/static/chunks/HASH .css:
395
395
.red-text{color:purple;font-weight:bolder}
396
396
397
397
@@ -407,7 +407,7 @@ module.exports = {
407
407
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
408
408
expect ( cssContent ) . toMatchInlineSnapshot ( `
409
409
[
410
- "/_next/static/chunks/test_integration_css-fixtures_nested-global_styles_613f73a3._ .css:
410
+ "/_next/static/chunks/HASH .css:
411
411
.red-text{color:purple;font-weight:bolder}
412
412
413
413
@@ -423,14 +423,14 @@ module.exports = {
423
423
} else if ( useLightningcss ) {
424
424
expect ( cssContent ) . toMatchInlineSnapshot ( `
425
425
[
426
- "/_next/static/css/197173a06644483f .css:
426
+ "/_next/static/css/HASH .css:
427
427
.red-text{color:purple;font-weight:bolder;color:red}.blue-text{color:orange;font-weight:bolder;color:#00f}",
428
428
]
429
429
` )
430
430
} else {
431
431
expect ( cssContent ) . toMatchInlineSnapshot ( `
432
432
[
433
- "/_next/static/css/5fd4808215677a0f .css:
433
+ "/_next/static/css/HASH .css:
434
434
.red-text{color:purple;font-weight:bolder;color:red}.blue-text{color:orange;font-weight:bolder;color:blue}",
435
435
]
436
436
` )
@@ -490,7 +490,7 @@ module.exports = {
490
490
if ( process . env . TURBOPACK && useLightningcss ) {
491
491
expect ( cssContent ) . toMatchInlineSnapshot ( `
492
492
[
493
- "/_next/static/chunks/test_integration_css-fixtures_multi-global-reversed_styles_9924990c._ .css:
493
+ "/_next/static/chunks/HASH .css:
494
494
.blue-text{color:#00f}
495
495
496
496
@@ -500,7 +500,7 @@ module.exports = {
500
500
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
501
501
expect ( cssContent ) . toMatchInlineSnapshot ( `
502
502
[
503
- "/_next/static/chunks/test_integration_css-fixtures_multi-global-reversed_styles_9924990c._ .css:
503
+ "/_next/static/chunks/HASH .css:
504
504
.blue-text{color:#00f}
505
505
506
506
@@ -510,14 +510,14 @@ module.exports = {
510
510
} else if ( useLightningcss ) {
511
511
expect ( cssContent ) . toMatchInlineSnapshot ( `
512
512
[
513
- "/_next/static/css/67c5003fc41fdadb .css:
513
+ "/_next/static/css/HASH .css:
514
514
.blue-text{color:#00f}.red-text{color:red}",
515
515
]
516
516
` )
517
517
} else {
518
518
expect ( cssContent ) . toMatchInlineSnapshot ( `
519
519
[
520
- "/_next/static/css/f06b052da7bb0328 .css:
520
+ "/_next/static/css/HASH .css:
521
521
.blue-text{color:blue}.red-text{color:red}",
522
522
]
523
523
` )
@@ -576,7 +576,7 @@ module.exports = {
576
576
if ( process . env . TURBOPACK && useLightningcss ) {
577
577
expect ( cssContent ) . toMatchInlineSnapshot ( `
578
578
[
579
- "/_next/static/chunks/test_integration_css-fixtures_url-global_styles_46281715._ .css:
579
+ "/_next/static/chunks/HASH .css:
580
580
.red-text{color:red;background-image:url(../media/dark.993bedd3.svg),url(../media/dark2.993bedd3.svg)}
581
581
582
582
@@ -589,7 +589,7 @@ module.exports = {
589
589
} else if ( process . env . TURBOPACK && ! useLightningcss ) {
590
590
expect ( cssContent ) . toMatchInlineSnapshot ( `
591
591
[
592
- "/_next/static/chunks/test_integration_css-fixtures_url-global_styles_46281715._ .css:
592
+ "/_next/static/chunks/HASH .css:
593
593
.red-text{color:red;background-image:url(../media/dark.993bedd3.svg),url(../media/dark2.993bedd3.svg)}
594
594
595
595
@@ -602,14 +602,14 @@ module.exports = {
602
602
} else if ( useLightningcss ) {
603
603
expect ( cssContent ) . toMatchInlineSnapshot ( `
604
604
[
605
- "/_next/static/css/02830b0dd136adeb .css:
605
+ "/_next/static/css/HASH .css:
606
606
.red-text{color:red;background-image:url(/_next/static/media/dark.6b01655b.svg),url(/_next/static/media/dark2.6b01655b.svg)}.blue-text{color:orange;background-image:url(/_next/static/media/light.2da1d3d6.svg);font-weight:bolder;color:#00f}",
607
607
]
608
608
` )
609
609
} else {
610
610
expect ( cssContent ) . toMatchInlineSnapshot ( `
611
611
[
612
- "/_next/static/css/bf86b6e30872ca37 .css:
612
+ "/_next/static/css/HASH .css:
613
613
.red-text{color:red;background-image:url(/_next/static/media/dark.6b01655b.svg),url(/_next/static/media/dark2.6b01655b.svg)}.blue-text{color:orange;font-weight:bolder;background-image:url(/_next/static/media/light.2da1d3d6.svg);color:blue}",
614
614
]
615
615
` )
@@ -653,7 +653,7 @@ describe('CSS URL via `file-loader` and asset prefix (1)', () => {
653
653
if ( process . env . TURBOPACK ) {
654
654
expect ( cssContent ) . toMatchInlineSnapshot ( `
655
655
[
656
- "/_next/static/chunks/test_integration_css-fixtures_url-global-asset-prefix-1_styles_e99cb7f8._ .css:
656
+ "/_next/static/chunks/HASH .css:
657
657
.red-text{color:red;background-image:url(../media/dark.993bedd3.svg) url(../media/dark2.993bedd3.svg)}
658
658
659
659
@@ -666,7 +666,7 @@ describe('CSS URL via `file-loader` and asset prefix (1)', () => {
666
666
} else {
667
667
expect ( cssContent ) . toMatchInlineSnapshot ( `
668
668
[
669
- "/_next/static/css/18198e5ba4d54f6f .css:
669
+ "/_next/static/css/HASH .css:
670
670
.red-text{color:red;background-image:url(/foo/_next/static/media/dark.6b01655b.svg) url(/foo/_next/static/media/dark2.6b01655b.svg)}.blue-text{color:orange;font-weight:bolder;background-image:url(/foo/_next/static/media/light.2da1d3d6.svg);color:blue}",
671
671
]
672
672
` )
@@ -709,7 +709,7 @@ describe('CSS URL via `file-loader` and asset prefix (2)', () => {
709
709
if ( process . env . TURBOPACK ) {
710
710
expect ( cssContent ) . toMatchInlineSnapshot ( `
711
711
[
712
- "/_next/static/chunks/test_integration_css-fixtures_url-global-asset-prefix-2_styles_7b29c72b._ .css:
712
+ "/_next/static/chunks/HASH .css:
713
713
.red-text{color:red;background-image:url(../media/dark.993bedd3.svg) url(../media/dark2.993bedd3.svg)}
714
714
715
715
@@ -722,7 +722,7 @@ describe('CSS URL via `file-loader` and asset prefix (2)', () => {
722
722
} else {
723
723
expect ( cssContent ) . toMatchInlineSnapshot ( `
724
724
[
725
- "/_next/static/css/18198e5ba4d54f6f .css:
725
+ "/_next/static/css/HASH .css:
726
726
.red-text{color:red;background-image:url(/foo/_next/static/media/dark.6b01655b.svg) url(/foo/_next/static/media/dark2.6b01655b.svg)}.blue-text{color:orange;font-weight:bolder;background-image:url(/foo/_next/static/media/light.2da1d3d6.svg);color:blue}",
727
727
]
728
728
` )
@@ -741,7 +741,12 @@ async function getStylesheetContents($, appPort, items) {
741
741
if ( res . status !== 200 )
742
742
throw new Error ( `Failed to load stylesheet: ${ href } ` )
743
743
const text = await res . text ( )
744
- results . push ( `${ href } :\n${ text . replace ( / \/ \* .* ?\* \/ / g, '' ) . trim ( ) } ` )
744
+ results . push (
745
+ `${ href . replace (
746
+ / [ 0 - 9 a - f ] { 8 , } / g,
747
+ 'HASH'
748
+ ) } :\n${ text . replace ( / \/ \* .* ?\* \/ / g, '' ) . trim ( ) } `
749
+ )
745
750
}
746
751
return results
747
752
}
0 commit comments