Skip to content

Comments

Update vite config#22

Open
donatPeter wants to merge 7 commits intomasterfrom
update_vite_config
Open

Update vite config#22
donatPeter wants to merge 7 commits intomasterfrom
update_vite_config

Conversation

@donatPeter
Copy link
Member

No description provided.

@donatPeter donatPeter requested a review from Copilot June 5, 2025 09:10
@netlify
Copy link

netlify bot commented Jun 5, 2025

Deploy Preview for gs-components ready!

Name Link
🔨 Latest commit 0e3d139
🔍 Latest deploy log https://app.netlify.com/projects/gs-components/deploys/68415ffbde2b3b0008ac0b62
😎 Deploy Preview https://deploy-preview-22--gs-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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

Updates the Vite configuration to include helper files in type declarations and split them into a separate chunk, and streamlines the ESLint setup.

  • Expanded include globs and added a manualChunks rule for helpers in both TS and JS Vite configs
  • Removed the custom unused-vars override from the ESLint flat config
  • Reformatted multiline arrays for better readability

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

File Description
vite.config.ts Added src/helpers/*.ts to include, introduced manualChunks
vite.config.js Mirrored TS config updates in JS variant
eslint.config.js Dropped custom @typescript-eslint/no-unused-vars rule override
Comments suppressed due to low confidence (1)

eslint.config.js:18

  • [nitpick] The custom @typescript-eslint/no-unused-vars override was removed—please confirm that dropping this rule is intentional, as it may increase linter noise.
}, skipFormatting);

Comment on lines +48 to +49
manualChunks: {
helpers: ['./src/helpers/*.ts'],
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

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

Rollup's manualChunks does not expand glob patterns; this array won’t be resolved. Consider using a function, e.g.: manualChunks(id) { if (id.includes('/src/helpers/')) return 'helpers'; }.

Suggested change
manualChunks: {
helpers: ['./src/helpers/*.ts'],
manualChunks: (id) => {
if (id.includes('/src/helpers/')) {
return 'helpers';
}

Copilot uses AI. Check for mistakes.
Comment on lines +46 to +47
manualChunks: {
helpers: ['./src/helpers/*.ts'],
Copy link

Copilot AI Jun 5, 2025

Choose a reason for hiding this comment

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

Same issue as in the TS config: Rollup doesn't process globs here. Use a function-based manualChunks that checks id.includes('/src/helpers/').

Suggested change
manualChunks: {
helpers: ['./src/helpers/*.ts'],
manualChunks: (id) => {
if (id.includes('/src/helpers/')) {
return 'helpers';
}

Copilot uses AI. Check for mistakes.
donatpeter added 2 commits June 5, 2025 11:13
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.

2 participants