Correctly import/prebundle V6 store configs #324
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #305
This reverts #289, and fixes it a better way, by replacing filesystem imports (
/@fs/
style absolute path imports) with normal node_modules style imports. So, instead of:We'll import from
Which vite can correctly pre-bundle and add a browserHash to.
To test this, run the vue example in this repo. You should see some messages about new dependencies being optimized in the terminal, and the storybook should load up just fine with no errors about
No docs.container set
.I tested this out back to our minimum supported versions of vite (2.5.2) and storybook (6.4.0). It worked fine, although at that old version, one page refresh was required on the very first startup (due to changes in pre-bundled deps). This doesn't happen in vite 2.9.0, which has better support for finding new deps.