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

Ignore Cached Dependencies when Starting Studio. #405

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Conversation

tmeyer2115
Copy link
Contributor

@tmeyer2115 tmeyer2115 commented Oct 11, 2023

In Vite, your project's dependencies are pre-bundled before the Dev server loads your site. As an optimization, Vite allows these bundled dependencies to be cached. If a dependency hasn't changed, Vite does not need to pre-bundle it again. See details here: https://vitejs.dev/guide/dep-pre-bundling.html#caching. Unfortunately, this caching behavior is causing significant problems in Storm (https://yext.slack.com/archives/C03F59PCJRK/p1696964495301699).

In this PR, I remove the cache optimization from Studio's Vite instance. This is done by running Vite with --force. Although it wasn't strictly necessary, I also removed optimizeDeps from the Vite Config. Dependencies will always be pre-bundled whenever Studio starts up. Removing this optimization, I did not notice a big drop in performance locally.

J=SLAP-2961
TEST=manual

I ran this new version of Studio against the Test Site. I verified none of the cached dependencies were used and that Studio started up as expected.

@tmeyer2115 tmeyer2115 merged commit 6e120f2 into main Oct 11, 2023
15 checks passed
@tmeyer2115 tmeyer2115 deleted the dev/ignore-cache branch October 11, 2023 16:22
@tmeyer2115 tmeyer2115 mentioned this pull request Oct 11, 2023
tmeyer2115 added a commit that referenced this pull request Oct 11, 2023
## Features
- When specifying a Component's Prop Interface, you can now use the
`extends` keyword. (#395)

## Changes
- Cached, pre-bundled dependencies are now ignored when starting Studio.
Studio's Vite instance will pre-bundle all dependencies each time Studio
is started. (#405)
- Props with a Tooltip now have an Info Icon (#403)

## Fixes
- Incorrect imports for commonly-named Components have been fixed.
(#398)
alextaing pushed a commit that referenced this pull request Oct 11, 2023
In Vite, your project's dependencies are pre-bundled before the Dev
server loads your site. As an optimization, Vite allows these bundled
dependencies to be cached. If a dependency hasn't changed, Vite does not
need to pre-bundle it again. See details here:
https://vitejs.dev/guide/dep-pre-bundling.html#caching. Unfortunately,
this caching behavior is causing significant problems in Storm
(https://yext.slack.com/archives/C03F59PCJRK/p1696964495301699).

In this PR, I remove the cache optimization from Studio's Vite instance.
This is done by running Vite with `--force`. Although it wasn't strictly
necessary, I also removed `optimizeDeps` from the Vite Config.
Dependencies will always be pre-bundled whenever Studio starts up.
Removing this optimization, I did not notice a big drop in performance
locally.

J=SLAP-2961
TEST=manual

I ran this new version of Studio against the Test Site. I verified none
of the cached dependencies were used and that Studio started up as
expected.

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
alextaing pushed a commit that referenced this pull request Oct 11, 2023
## Features
- When specifying a Component's Prop Interface, you can now use the
`extends` keyword. (#395)

## Changes
- Cached, pre-bundled dependencies are now ignored when starting Studio.
Studio's Vite instance will pre-bundle all dependencies each time Studio
is started. (#405)
- Props with a Tooltip now have an Info Icon (#403)

## Fixes
- Incorrect imports for commonly-named Components have been fixed.
(#398)
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