Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Rollup 4 hash change #8875

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/astro/src/assets/vite-plugin-assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export default function assets({
},
// In build, rewrite paths to ESM imported images in code to their final location
async renderChunk(code) {
const assetUrlRE = /__ASTRO_ASSET_IMAGE__([a-z\d]{8})__(?:_(.*?)__)?/g;
const assetUrlRE = /__ASTRO_ASSET_IMAGE__([\w$]{8})__(?:_(.*?)__)?/g;

let match;
let s;
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/astro-css-bundling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('CSS Bundling', function () {

it('CSS includes hashes', async () => {
const [firstFound] = await fixture.readdir('/_astro');
expect(firstFound).to.match(/[a-z]+\.[0-9a-z]{8}\.css/);
expect(firstFound).to.match(/[a-z]+\.[\w-]{8}\.css/);
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/ssr-manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('astro:ssr-manifest', () => {
const html = await response.text();

const $ = cheerio.load(html);
expect($('#assets').text()).to.equal('["/_astro/index.a8a337e4.css"]');
expect($('#assets').text()).to.match(/\["\/_astro\/index.([\w-]{8})\.css"\]/);
});

it('includes compressHTML', async () => {
Expand Down
4 changes: 3 additions & 1 deletion packages/astro/test/ssr-split-manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ describe('astro:ssr-manifest, split', () => {
const html = await response.text();

const $ = cheerio.load(html);
expect($('#assets').text()).to.equal('["/_astro/index.a8a337e4.css","/prerender/index.html"]');
expect($('#assets').text()).to.match(
/\["\/_astro\/index\.([\w-]{8})\.css","\/prerender\/index\.html"\]/
);
});

it('should give access to entry points that exists on file system', async () => {
Expand Down
Loading