Skip to content

fix build#24

Merged
benhalverson merged 1 commit intomainfrom
fix-broken-build
Oct 28, 2025
Merged

fix build#24
benhalverson merged 1 commit intomainfrom
fix-broken-build

Conversation

@benhalverson
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings October 28, 2025 08:10
@benhalverson benhalverson marked this pull request as ready for review October 28, 2025 08:10
@benhalverson benhalverson merged commit f241913 into main Oct 28, 2025
1 check passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses build issues by modifying the chunk splitting strategy in Vite configuration. The changes prevent dependency issues by keeping @react-three packages bundled with their consuming components rather than in a separate chunk.

Key Changes:

  • Removed separate chunking for @react-three packages
  • Modified Three.js chunking logic to exclude @react-three packages
  • Reordered chunk detection logic to prioritize vendor chunks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}
// Keep Three.js separate but don't split @react-three packages
// They need to stay with the component that uses them to avoid dependency issues
if (id.includes('node_modules/three/') && !id.includes('@react-three')) {
Copy link

Copilot AI Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition !id.includes('@react-three') will incorrectly exclude paths like node_modules/three/examples/jsm/... if they happen to contain the string '@react-three' anywhere in the full path (e.g., in a parent directory name). Use a more precise check like !id.includes('node_modules/@react-three') to ensure you're only excluding the @react-three packages and not legitimate three.js files.

Suggested change
if (id.includes('node_modules/three/') && !id.includes('@react-three')) {
if (id.includes('node_modules/three/') && !id.includes('node_modules/@react-three')) {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments