Skip to content

Commit b960901

Browse files
committed
fix: filename hashes in unit tests
1 parent c056840 commit b960901

11 files changed

+95
-95
lines changed

packages/rollup-plugin-html/test/rollup-plugin-html.test.ts

+28-28
Original file line numberDiff line numberDiff line change
@@ -705,11 +705,11 @@ describe('rollup-plugin-html', () => {
705705
expect(outputHtml).to.include(
706706
'<link rel="mask-icon" href="assets/image-a.svg" color="#3f93ce">',
707707
);
708-
expect(outputHtml).to.include('<link rel="stylesheet" href="assets/styles-hdiMuZ9V.css">');
709-
expect(outputHtml).to.include('<link rel="stylesheet" href="assets/x-wxoPDuod.css">');
710-
expect(outputHtml).to.include('<link rel="stylesheet" href="assets/y-yU65zx9z.css">');
711-
expect(outputHtml).to.include('<img src="assets/image-c-Mr5Lb2jQ.png">');
712-
expect(outputHtml).to.include('<img src="assets/image-b-yrDWczn5.svg">');
708+
expect(outputHtml).to.include('<link rel="stylesheet" href="assets/styles-CF2Iy5n1.css">');
709+
expect(outputHtml).to.include('<link rel="stylesheet" href="assets/x-DDGg8O6h.css">');
710+
expect(outputHtml).to.include('<link rel="stylesheet" href="assets/y-DJTrnPH3.css">');
711+
expect(outputHtml).to.include('<img src="assets/image-c-yvktvaNB.png">');
712+
expect(outputHtml).to.include('<img src="assets/image-b-DKsNZzOf.svg">');
713713
});
714714

715715
it('deduplicates static assets with similar names', async () => {
@@ -762,7 +762,7 @@ describe('rollup-plugin-html', () => {
762762

763763
expect(stripNewlines(getAsset(output, 'index.html').source)).to.equal(
764764
'<html><head><link rel="icon" type="image/png" sizes="32x32" href="assets/foo.svg"></head>' +
765-
'<body><img src="assets/foo-WjgrfMGT.svg"></body></html>',
765+
'<body><img src="assets/foo-BaOCt8wZ.svg"></body></html>',
766766
);
767767
});
768768

@@ -789,9 +789,9 @@ describe('rollup-plugin-html', () => {
789789

790790
expect(stripNewlines(getAsset(output, 'index.html').source)).to.equal(
791791
'<html><head></head><body>' +
792-
'<link rel="stylesheet" href="assets/image-a-Mr5Lb2jQ.png">' +
793-
'<img src="assets/image-a-Mr5Lb2jQ.png">' +
794-
'<img src="assets/image-a-Mr5Lb2jQ.png">' +
792+
'<link rel="stylesheet" href="assets/image-a-yvktvaNB.png">' +
793+
'<img src="assets/image-a-yvktvaNB.png">' +
794+
'<img src="assets/image-a-yvktvaNB.png">' +
795795
'</body></html>',
796796
);
797797
});
@@ -837,20 +837,20 @@ describe('rollup-plugin-html', () => {
837837

838838
expect(stripNewlines(getAsset(output, 'page-a.html').source)).to.equal(
839839
'<html><head></head><body>' +
840-
' <img src="assets/image-a-Mr5Lb2jQ.png">' +
840+
' <img src="assets/image-a-yvktvaNB.png">' +
841841
' </body></html>',
842842
);
843843

844844
expect(stripNewlines(getAsset(output, 'page-b.html').source)).to.equal(
845845
'<html><head></head><body>' +
846-
' <link rel="stylesheet" href="assets/image-a-Mr5Lb2jQ.png">' +
846+
' <link rel="stylesheet" href="assets/image-a-yvktvaNB.png">' +
847847
' </body></html>',
848848
);
849849

850850
expect(stripNewlines(getAsset(output, 'page-c.html').source)).to.equal(
851851
'<html><head></head><body>' +
852-
' <link rel="stylesheet" href="assets/image-a-Mr5Lb2jQ.png">' +
853-
' <img src="assets/image-a-Mr5Lb2jQ.png">' +
852+
' <link rel="stylesheet" href="assets/image-a-yvktvaNB.png">' +
853+
' <img src="assets/image-a-yvktvaNB.png">' +
854854
' </body></html>',
855855
);
856856
});
@@ -1034,9 +1034,9 @@ describe('rollup-plugin-html', () => {
10341034
expect(stripNewlines(getAsset(output, 'x/index.html').source)).to.equal(
10351035
[
10361036
'<html><head></head><body>',
1037-
'<img src="../assets/foo-ACZ5M5Wv.svg">',
1038-
'<link rel="stylesheet" href="../assets/styles-hdiMuZ9V.css">',
1039-
'<img src="../assets/image-b-yrDWczn5.svg">',
1037+
'<img src="../assets/foo-AJnkzla8.svg">',
1038+
'<link rel="stylesheet" href="../assets/styles-CF2Iy5n1.css">',
1039+
'<img src="../assets/image-b-DKsNZzOf.svg">',
10401040
'</body></html>',
10411041
].join(''),
10421042
);
@@ -1189,35 +1189,35 @@ describe('rollup-plugin-html', () => {
11891189
.trim();
11901190
expect(rewrittenCss).to.equal(
11911191
`#a {
1192-
background-image: url("assets/star-mrrzn5BV.svg");
1192+
background-image: url("assets/star-CauvOfkF.svg");
11931193
}
11941194
11951195
#b {
1196-
background-image: url("assets/star-mrrzn5BV.svg#foo");
1196+
background-image: url("assets/star-CauvOfkF.svg#foo");
11971197
}
11981198
11991199
#c {
1200-
background-image: url("assets/star-eErsO14u.png");
1200+
background-image: url("assets/star-B4Suw7Xi.png");
12011201
}
12021202
12031203
#d {
1204-
background-image: url("assets/star-yqfHyXQC.jpg");
1204+
background-image: url("assets/star-DKp8fJdA.jpg");
12051205
}
12061206
12071207
#e {
1208-
background-image: url("assets/star-G_i5Rpoh.jpeg");
1208+
background-image: url("assets/star-b-LlGmiF.jpeg");
12091209
}
12101210
12111211
#f {
1212-
background-image: url("assets/star-l7b58t3m.webp");
1212+
background-image: url("assets/star-CXtvny3e.webp");
12131213
}
12141214
12151215
#g {
1216-
background-image: url("assets/star-P4TYRBwL.gif");
1216+
background-image: url("assets/star-_hNhEHAt.gif");
12171217
}
12181218
12191219
#h {
1220-
background-image: url("assets/star-H06WHrYy.avif");
1220+
background-image: url("assets/star-fTpYetjL.avif");
12211221
}`.trim(),
12221222
);
12231223
});
@@ -1284,27 +1284,27 @@ describe('rollup-plugin-html', () => {
12841284
expect(outputHtml).to.include('<link rel="mask-icon" href="./image-a.svg" color="#3f93ce">');
12851285
expect(outputHtml).to.include('<link rel="mask-icon" href="image-d.svg" color="#3f93ce">');
12861286
expect(outputHtml).to.include(
1287-
'<link rel="stylesheet" href="assets/styles-with-referenced-assets-NuwIw8gN.css">',
1287+
'<link rel="stylesheet" href="assets/styles-with-referenced-assets-C5klO55x.css">',
12881288
);
12891289
expect(outputHtml).to.include('<link rel="stylesheet" href="./foo/x.css">');
12901290
expect(outputHtml).to.include('<link rel="stylesheet" href="foo/bar/y.css">');
1291-
expect(outputHtml).to.include('<img src="assets/assets/image-d-y8_AQMDl.png">');
1291+
expect(outputHtml).to.include('<img src="assets/assets/image-d-DLz8BAwO.png">');
12921292
expect(outputHtml).to.include('<img src="./image-d.svg">');
12931293

12941294
const rewrittenCss = getAsset(output, 'styles-with-referenced-assets.css')
12951295
.source.toString()
12961296
.trim();
12971297
expect(rewrittenCss).to.equal(
12981298
`#a1 {
1299-
background-image: url("assets/image-a-Mr5Lb2jQ.png");
1299+
background-image: url("assets/image-a-yvktvaNB.png");
13001300
}
13011301
13021302
#a2 {
13031303
background-image: url("image-a.svg");
13041304
}
13051305
13061306
#d1 {
1307-
background-image: url("assets/image-d-y8_AQMDl.png");
1307+
background-image: url("assets/image-d-DLz8BAwO.png");
13081308
}
13091309
13101310
#d2 {

packages/rollup-plugin-import-meta-assets/test/integration.test.js

+35-35
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ describe('rollup-plugin-import-meta-assets', () => {
5151

5252
expect(output.length).to.equal(6);
5353
expectChunk(output, 'snapshots/simple-bundle.js', 'simple-bundle.js', [
54-
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-ZInu4dBJ.svg'),
55-
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two--yckvrYd.svg'),
56-
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-CDdgprDC.svg'),
57-
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-lJVunLww.svg'),
58-
expectAsset(output, 'snapshots/five', 'five', 'assets/five-Z74_0e9C'),
54+
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-Bkie7h0E.svg'),
55+
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two-D7JyS-th.svg'),
56+
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-IN2CmsMK.svg'),
57+
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-CUlW6cvD.svg'),
58+
expectAsset(output, 'snapshots/five', 'five', 'assets/five-Bnvj_R70'),
5959
]);
6060
});
6161

@@ -80,11 +80,11 @@ describe('rollup-plugin-import-meta-assets', () => {
8080

8181
expect(output.length).to.equal(6);
8282
expectChunk(output, 'snapshots/transform-bundle.js', 'transform-bundle.js', [
83-
expectAsset(output, 'snapshots/one.min.svg', 'one.svg', 'assets/one-PkYUFgN1.svg'),
84-
expectAsset(output, 'snapshots/two.min.svg', 'two.svg', 'assets/two-mXcSFMIh.svg'),
85-
expectAsset(output, 'snapshots/three.min.svg', 'three.svg', 'assets/three-LRYckR_0.svg'),
86-
expectAsset(output, 'snapshots/four.min.svg', 'four.svg', 'assets/four-rNTiHfqi.svg'),
87-
expectAsset(output, 'snapshots/image.jpg', 'image.jpg', 'assets/image-vdjfMj42.jpg'),
83+
expectAsset(output, 'snapshots/one.min.svg', 'one.svg', 'assets/one--RhQWA3U.svg'),
84+
expectAsset(output, 'snapshots/two.min.svg', 'two.svg', 'assets/two-CZdxIUwi.svg'),
85+
expectAsset(output, 'snapshots/three.min.svg', 'three.svg', 'assets/three-tFhyRH_R.svg'),
86+
expectAsset(output, 'snapshots/four.min.svg', 'four.svg', 'assets/four-Cs1OId-q.svg'),
87+
expectAsset(output, 'snapshots/image.jpg', 'image.jpg', 'assets/image-C92N8yPj.jpg'),
8888
]);
8989
});
9090

@@ -109,10 +109,10 @@ describe('rollup-plugin-import-meta-assets', () => {
109109

110110
expect(output.length).to.equal(5);
111111
expectChunk(output, 'snapshots/transform-bundle-ignored.js', 'transform-bundle-ignored.js', [
112-
expectAsset(output, 'snapshots/one.min.svg', 'one.svg', 'assets/one-PkYUFgN1.svg'),
113-
expectAsset(output, 'snapshots/two.min.svg', 'two.svg', 'assets/two-mXcSFMIh.svg'),
114-
expectAsset(output, 'snapshots/three.min.svg', 'three.svg', 'assets/three-LRYckR_0.svg'),
115-
expectAsset(output, 'snapshots/four.min.svg', 'four.svg', 'assets/four-rNTiHfqi.svg'),
112+
expectAsset(output, 'snapshots/one.min.svg', 'one.svg', 'assets/one--RhQWA3U.svg'),
113+
expectAsset(output, 'snapshots/two.min.svg', 'two.svg', 'assets/two-CZdxIUwi.svg'),
114+
expectAsset(output, 'snapshots/three.min.svg', 'three.svg', 'assets/three-tFhyRH_R.svg'),
115+
expectAsset(output, 'snapshots/four.min.svg', 'four.svg', 'assets/four-Cs1OId-q.svg'),
116116
]);
117117
});
118118

@@ -127,10 +127,10 @@ describe('rollup-plugin-import-meta-assets', () => {
127127

128128
expect(output.length).to.equal(5);
129129
expectChunk(output, 'snapshots/multi-level-bundle.js', 'multi-level-bundle.js', [
130-
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-ZInu4dBJ.svg'),
131-
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two--yckvrYd.svg'),
132-
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-CDdgprDC.svg'),
133-
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-lJVunLww.svg'),
130+
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-Bkie7h0E.svg'),
131+
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two-D7JyS-th.svg'),
132+
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-IN2CmsMK.svg'),
133+
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-CUlW6cvD.svg'),
134134
]);
135135
});
136136

@@ -149,10 +149,10 @@ describe('rollup-plugin-import-meta-assets', () => {
149149

150150
expect(output.length).to.equal(5);
151151
expectChunk(output, 'snapshots/multi-level-bundle.js', 'multi-level-bundle.js', [
152-
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-ZInu4dBJ.svg'),
153-
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two--yckvrYd.svg'),
154-
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-CDdgprDC.svg'),
155-
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-lJVunLww.svg'),
152+
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-Bkie7h0E.svg'),
153+
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two-D7JyS-th.svg'),
154+
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-IN2CmsMK.svg'),
155+
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-CUlW6cvD.svg'),
156156
]);
157157
});
158158

@@ -175,15 +175,15 @@ describe('rollup-plugin-import-meta-assets', () => {
175175
'snapshots/different-asset-levels-bundle.js',
176176
'different-asset-levels-bundle.js',
177177
[
178-
expectAsset(output, 'snapshots/one.svg', 'one-deep.svg', 'assets/one-deep-ZInu4dBJ.svg'),
179-
expectAsset(output, 'snapshots/two.svg', 'two-deep.svg', 'assets/two-deep--yckvrYd.svg'),
178+
expectAsset(output, 'snapshots/one.svg', 'one-deep.svg', 'assets/one-deep-Bkie7h0E.svg'),
179+
expectAsset(output, 'snapshots/two.svg', 'two-deep.svg', 'assets/two-deep-D7JyS-th.svg'),
180180
expectAsset(
181181
output,
182182
'snapshots/three.svg',
183183
'three-deep.svg',
184-
'assets/three-deep-CDdgprDC.svg',
184+
'assets/three-deep-IN2CmsMK.svg',
185185
),
186-
expectAsset(output, 'snapshots/four.svg', 'four-deep.svg', 'assets/four-deep-lJVunLww.svg'),
186+
expectAsset(output, 'snapshots/four.svg', 'four-deep.svg', 'assets/four-deep-CUlW6cvD.svg'),
187187
],
188188
);
189189
});
@@ -215,10 +215,10 @@ describe('rollup-plugin-import-meta-assets', () => {
215215
expectChunk(output, 'snapshots/one-bundle.js', 'one-bundle.js', []);
216216
expectChunk(output, 'snapshots/two-bundle.js', 'two-bundle.js', []);
217217
expectChunk(output, 'snapshots/three-bundle.js', 'three-bundle.js', [
218-
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-CDdgprDC.svg'),
218+
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-IN2CmsMK.svg'),
219219
]);
220220
expectChunk(output, 'snapshots/four-bundle.js', 'four-bundle.js', [
221-
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-lJVunLww.svg'),
221+
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-CUlW6cvD.svg'),
222222
]);
223223
});
224224

@@ -269,9 +269,9 @@ describe('rollup-plugin-import-meta-assets', () => {
269269

270270
expect(output.length).to.equal(4);
271271
expectChunk(output, 'snapshots/dynamic-vars.js', 'dynamic-vars.js', [
272-
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-CDdgprDC.svg'),
273-
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two--yckvrYd.svg'),
274-
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-ZInu4dBJ.svg'),
272+
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-IN2CmsMK.svg'),
273+
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two-D7JyS-th.svg'),
274+
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-Bkie7h0E.svg'),
275275
]);
276276
});
277277

@@ -288,10 +288,10 @@ describe('rollup-plugin-import-meta-assets', () => {
288288

289289
expect(output.length).to.equal(5);
290290
expectChunk(output, 'snapshots/directories-ignored.js', 'directories-ignored.js', [
291-
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-ZInu4dBJ.svg'),
292-
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two--yckvrYd.svg'),
293-
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-CDdgprDC.svg'),
294-
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-lJVunLww.svg'),
291+
expectAsset(output, 'snapshots/one.svg', 'one.svg', 'assets/one-Bkie7h0E.svg'),
292+
expectAsset(output, 'snapshots/two.svg', 'two.svg', 'assets/two-D7JyS-th.svg'),
293+
expectAsset(output, 'snapshots/three.svg', 'three.svg', 'assets/three-IN2CmsMK.svg'),
294+
expectAsset(output, 'snapshots/four.svg', 'four.svg', 'assets/four-CUlW6cvD.svg'),
295295
]);
296296
});
297297
});

packages/rollup-plugin-import-meta-assets/test/snapshots/different-asset-levels-bundle.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const nameOne = 'one-name';
2-
const imageOne = new URL(new URL('assets/one-deep-ZInu4dBJ.svg', import.meta.url).href, import.meta.url).href;
2+
const imageOne = new URL(new URL('assets/one-deep-Bkie7h0E.svg', import.meta.url).href, import.meta.url).href;
33

44
const nameTwo = 'two-name';
5-
const imageTwo = new URL(new URL('assets/two-deep--yckvrYd.svg', import.meta.url).href, import.meta.url).href;
5+
const imageTwo = new URL(new URL('assets/two-deep-D7JyS-th.svg', import.meta.url).href, import.meta.url).href;
66

77
const nameThree = 'three-name';
8-
const imageThree = new URL(new URL('assets/three-deep-CDdgprDC.svg', import.meta.url).href, import.meta.url).href;
8+
const imageThree = new URL(new URL('assets/three-deep-IN2CmsMK.svg', import.meta.url).href, import.meta.url).href;
99

1010
const nameFour = 'four-name';
11-
const imageFour = new URL(new URL('assets/four-deep-lJVunLww.svg', import.meta.url).href, import.meta.url).href;
11+
const imageFour = new URL(new URL('assets/four-deep-CUlW6cvD.svg', import.meta.url).href, import.meta.url).href;
1212

1313
console.log({
1414
[nameOne]: imageOne,

packages/rollup-plugin-import-meta-assets/test/snapshots/directories-ignored.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
const justUrlObject = new URL(new URL('assets/one-ZInu4dBJ.svg', import.meta.url).href, import.meta.url);
2-
const href = new URL(new URL('assets/two--yckvrYd.svg', import.meta.url).href, import.meta.url).href;
3-
const pathname = new URL(new URL('assets/three-CDdgprDC.svg', import.meta.url).href, import.meta.url).pathname;
4-
const searchParams = new URL(new URL('assets/four-lJVunLww.svg', import.meta.url).href, import.meta.url).searchParams;
1+
const justUrlObject = new URL(new URL('assets/one-Bkie7h0E.svg', import.meta.url).href, import.meta.url);
2+
const href = new URL(new URL('assets/two-D7JyS-th.svg', import.meta.url).href, import.meta.url).href;
3+
const pathname = new URL(new URL('assets/three-IN2CmsMK.svg', import.meta.url).href, import.meta.url).pathname;
4+
const searchParams = new URL(new URL('assets/four-CUlW6cvD.svg', import.meta.url).href, import.meta.url).searchParams;
55

66
const directories = [
77
new URL('./', import.meta.url),

packages/rollup-plugin-import-meta-assets/test/snapshots/dynamic-vars.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
function __variableDynamicURLRuntime0__(path) {
22
switch (path) {
3-
case './dynamic-assets/one.svg': return new URL(new URL('assets/one-ZInu4dBJ.svg', import.meta.url).href, import.meta.url);
4-
case './dynamic-assets/three.svg': return new URL(new URL('assets/three-CDdgprDC.svg', import.meta.url).href, import.meta.url);
5-
case './dynamic-assets/two.svg': return new URL(new URL('assets/two--yckvrYd.svg', import.meta.url).href, import.meta.url);
3+
case './dynamic-assets/one.svg': return new URL(new URL('assets/one-Bkie7h0E.svg', import.meta.url).href, import.meta.url);
4+
case './dynamic-assets/three.svg': return new URL(new URL('assets/three-IN2CmsMK.svg', import.meta.url).href, import.meta.url);
5+
case './dynamic-assets/two.svg': return new URL(new URL('assets/two-D7JyS-th.svg', import.meta.url).href, import.meta.url);
66
default: return new Promise(function(resolve, reject) {
77
(typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)(
88
reject.bind(null, new Error("Unknown variable dynamic new URL statement: " + path))
@@ -16,6 +16,6 @@ const names = ['one', 'two'];
1616
// Therefore, we expect both one.svg, two.svg and three.svg to be bundled, and this to turn into a switch statement
1717
// with 3 cases (for all 3 assets in the dynamic-assets folder)
1818
const dynamicImgs = names.map(n => __variableDynamicURLRuntime0__(`./dynamic-assets/${n}.svg`));
19-
const backticksImg = new URL(new URL('assets/three-CDdgprDC.svg', import.meta.url).href, import.meta.url);
19+
const backticksImg = new URL(new URL('assets/three-IN2CmsMK.svg', import.meta.url).href, import.meta.url);
2020

2121
console.log(dynamicImgs, backticksImg);
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
const nameFour = 'four-name';
2-
const imageFour = new URL(new URL('assets/four-lJVunLww.svg', import.meta.url).href, import.meta.url).href;
2+
const imageFour = new URL(new URL('assets/four-CUlW6cvD.svg', import.meta.url).href, import.meta.url).href;
33

44
export { imageFour, nameFour };

packages/rollup-plugin-import-meta-assets/test/snapshots/multi-level-bundle.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
const nameOne = 'one-name';
2-
const imageOne = new URL(new URL('assets/one-ZInu4dBJ.svg', import.meta.url).href, import.meta.url).href;
2+
const imageOne = new URL(new URL('assets/one-Bkie7h0E.svg', import.meta.url).href, import.meta.url).href;
33

44
const nameTwo = 'two-name';
5-
const imageTwo = new URL(new URL('assets/two--yckvrYd.svg', import.meta.url).href, import.meta.url).href;
5+
const imageTwo = new URL(new URL('assets/two-D7JyS-th.svg', import.meta.url).href, import.meta.url).href;
66

77
const nameThree = 'three-name';
8-
const imageThree = new URL(new URL('assets/three-CDdgprDC.svg', import.meta.url).href, import.meta.url).href;
8+
const imageThree = new URL(new URL('assets/three-IN2CmsMK.svg', import.meta.url).href, import.meta.url).href;
99

1010
const nameFour = 'four-name';
11-
const imageFour = new URL(new URL('assets/four-lJVunLww.svg', import.meta.url).href, import.meta.url).href;
11+
const imageFour = new URL(new URL('assets/four-CUlW6cvD.svg', import.meta.url).href, import.meta.url).href;
1212

1313
console.log({
1414
[nameOne]: imageOne,

0 commit comments

Comments
 (0)