Skip to content

Commit 460f600

Browse files
authored
docs: add note on testing vite locally (sveltejs#3027)
1 parent ef88d9b commit 460f600

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ git config core.hookspath .githooks
6565
### Coding style
6666

6767
There are a few guidelines we follow:
68+
6869
- Internal variables are written with `snake_case` while external APIs are written with `camelCase`
6970
- Provide a single object as the argument to public APIs. This object can have multiple properties
7071
- Avoid creating new test projects under `packages/kit/test/apps` but reuse an existing one when possible
@@ -88,6 +89,22 @@ You can run the test server with `cd packages/kit/test/apps/basics; pnpm run dev
8889

8990
You may need to install some dependencies first, e.g. with `npx playwright install-deps` (which only works on Ubuntu).
9091

92+
To test Vite locally, add the below code into the root `package.json` and run `pnpm install` to link the local Vite package.
93+
94+
```jsonc
95+
{
96+
// ...
97+
"dependencies": {
98+
"vite": "^2.0.0"
99+
},
100+
"pnpm": {
101+
"overrides": {
102+
"vite": "link:../path/to/vite/packages/vite"
103+
}
104+
}
105+
}
106+
```
107+
91108
### Documentation
92109

93110
All documentation for SvelteKit is in the `documentation` directory, and any improvements should be made as a Pull Request to this repository. The documentation is served via an API; the site itself is located in the [`sites` repository](https://github.com/sveltejs/sites).
@@ -109,6 +126,7 @@ npm publish --access=public
109126
## Code structure
110127

111128
Entry points to be aware of are:
129+
112130
- [`packages/create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte) - code that's run when you create a new project with `npm init svelte@next`
113131
- [`packages/kit/src/packaging`](https://github.com/sveltejs/kit/tree/master/packages/kit/src/packaging) - for the `svelte-kit package` command
114132
- [`packages/kit/src/core/dev/index.js`](https://github.com/sveltejs/kit/blob/master/packages/kit/src/core/dev/index.js) - for the dev-mode server

0 commit comments

Comments
 (0)