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

Warnings at build time with Astro using embedded studio #290

Open
Lornz- opened this issue Feb 11, 2025 · 0 comments
Open

Warnings at build time with Astro using embedded studio #290

Lornz- opened this issue Feb 11, 2025 · 0 comments

Comments

@Lornz-
Copy link

Lornz- commented Feb 11, 2025

Describe the bug

I recently upgraded to version 3.2.0 to use embedded studio without the need for an SSR adapter. I successfully built the project, but I encountered a few warnings that caught my attention.

Export "structureLocaleNamespace" of module "node_modules/sanity/lib/_chunks-es/pane.mjs" was reexported through module "node_modules/sanity/lib/structure.mjs" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.
Either change the import in "node_modules/sanity/lib/_chunks-es/pane.mjs" to point directly to the exporting module or reconfigure "output.manualChunks" to ensure these modules end up in the same chunk.

and

10:36:54 [vite] dist/_astro/studio-component.cy3tc0Fv.js                                   4,520.35 kB │ gzip: 1,370.49 kB
10:36:54 [WARN] [vite]
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.

Are there any suggestions on how to set up rollup with vite to reconfigure output.manualChunks as suggested to ensure that pointed modules end up in the same chunk and simultaneously improve chunking?

To Reproduce

Steps to reproduce the behavior:

  1. Bump @astro/sanity to 3.2.0
  2. Setup Sanity Studio in embedded mode
  3. Add studioRouterHistory: 'hash'in sanity parameters of astro.config
  4. astro build in Terminal
  5. See output

Expected behavior

It should build without any warning.

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Which versions of Sanity are you using?

@sanity/cli (global): 3.71.2 (latest: 3.74.1)
@sanity/astro: 3.2.0 (up to date)
@sanity/image-url: 1.1.0 (up to date)
@sanity/visual-editing: 2.12.12 (latest: 2.13.1)
sanity: 3.74.0 (latest: 3.74.1)

What operating system are you using?

MacOS Sequoia 15.2

Which versions of Node.js / npm are you running?

npm 10.7.0
node v22.2.0

@Lornz- Lornz- changed the title Warnings at build time using embedded studio Warnings at build time with Astro using embedded studio Feb 11, 2025
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

No branches or pull requests

1 participant