perf: optimize portfolio runtime delivery
Replace the blocking asset loader with progressive rendering, defer expensive media and Three.js work, and reduce hydration and animation costs. Move deployment from a static Nginx export to the standalone Next.js runtime with optimized dynamic images.
This commit is contained in:
@@ -14,10 +14,21 @@ test('the isometric footer preserves the real contact destinations and email', a
|
||||
|
||||
test('the footer renders the IsometricFooter scene instead of preloading PNG artwork', async () => {
|
||||
const footerSection = await readFile('src/components/FooterSection.tsx', 'utf8');
|
||||
const loader = await readFile('src/components/SiteLoader.tsx', 'utf8');
|
||||
|
||||
assert.match(footerSection, /<IsometricFooter locale=\{locale\}\s*\/>/);
|
||||
assert.doesNotMatch(footerSection, /next\/image/);
|
||||
assert.doesNotMatch(footerSection, /footer-background.*\.png/);
|
||||
assert.doesNotMatch(loader, /footer-background.*\.png/);
|
||||
});
|
||||
|
||||
test('the footer and large SVG stay server-rendered with delegated interaction', async () => {
|
||||
const [footer, scene, interaction] = await Promise.all([
|
||||
readFile('src/components/IsometricFooter/IsometricFooter.tsx', 'utf8'),
|
||||
readFile('src/components/IsometricFooter/IsometricScene.tsx', 'utf8'),
|
||||
readFile('src/components/IsometricFooter/FooterInteraction.tsx', 'utf8'),
|
||||
]);
|
||||
|
||||
assert.doesNotMatch(footer, /^['"]use client['"]/);
|
||||
assert.doesNotMatch(scene, /^['"]use client['"]/);
|
||||
assert.match(interaction, /^['"]use client['"]/);
|
||||
assert.match(footer, /data-contact-id=/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user