Skip to content

Commit 88c426b

Browse files
authored
docs: note chromium workaround (#213)
1 parent 21910b8 commit 88c426b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ All pull requests should be opened against the `main` branch.
8787
Integration tests for new features or regression tests as part of a bug fix are very welcome.
8888
Add them to projects in `packages/e2e-tests`.
8989

90+
If tests aren't running properly locally, open [scripts/jestGlobalSetup.js](./scripts/jestGlobalSetup.js) and update `chromium.launchServer` to use the default bundled chromium version:
91+
92+
```js
93+
// don't pass any options to use bundled chromium
94+
return chromium.launchServer();
95+
```
96+
9097
#### Documentation
9198

9299
If you've changed APIs, update the documentation.

docs/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ export default defineConfig({
202202

203203
Setting this option to `true` will directly pre-bundle Svelte libraries, which should improve initial page load performance. However, please note some caveats:
204204

205-
1. Deeply importing Svelte components is not supported. Either import all components from one entrypoint, or always stick to deep imports, otherwise it could cause multiple instance of the Svelte library running.
205+
1. Deeply importing Svelte components is not supported. Either import all components from one entrypoint, or always stick to deep imports, otherwise it could cause multiple instance of the Svelte library running.
206206

207-
2. When updating the Svelte compiler options in `svelte.config.js` or `vite.config.js`, delete the `node_modules/.vite` folder to trigger pre-bundling in Vite again.
207+
2. When updating the Svelte compiler options in `svelte.config.js` or `vite.config.js`, delete the `node_modules/.vite` folder to trigger pre-bundling in Vite again.
208208

209209
### generateMissingPreprocessorSourcemaps
210210

docs/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ Pre-bundling dependencies is an [optimization in Vite](https://vitejs.dev/guide/
9797

9898
Historically, Svelte components had issues being pre-bundled, causing [deduplication issues](https://github.com/vitejs/vite/issues/3910) and [CJS interoperability issues](https://github.com/vitejs/vite/issues/3024). Since Vite 2.5.2, [a new API in Vite](https://github.com/vitejs/vite/pull/4634) allowed us to [automatically handle Svelte library pre-bundling](https://github.com/sveltejs/vite-plugin-svelte/pull/157) for you.
9999

100-
Today, this feature had served us well, however a caveat remained that large Svelte component libraries often slows down the initial page load. If this affects you, try setting [experimental.prebundleSvelteLibraries](./config.md#prebundleSvelteLibraries) option to `true` to speed things up. (Note that it's an experimental option that may not always work)
100+
This feature had served us well, however a caveat remained that large Svelte component libraries often slows down the initial page load. If this affects you, try setting [experimental.prebundleSvelteLibraries](./config.md#prebundleSvelteLibraries) option to `true` to speed things up. (Note that it's an experimental option)
101101

102102
In case you still run into errors like `The requested module 'xxx' does not provide an export named 'yyy'`, please check our [open issues](https://github.com/sveltejs/vite-plugin-svelte/issues).

0 commit comments

Comments
 (0)