You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -178,3 +178,26 @@ The github action is included in this sample, you can use it to publish your new
178
178
prerelease: true# change this to false
179
179
```
180
180
181
+
182
+
## How to remove svelte dependencies
183
+
184
+
This plugin is packaged in vite and provides a dependency on the svelte framework. However, in practice some developers may not want to use svelte and only want to use the vite package.
185
+
186
+
In fact you can use this template without using svelte without any modifications at all. The compilation-related parts of the svelte compilation are loaded into the vite workflow as plugins, so even if you don't have svelte in your project, it won't matter much.
187
+
188
+
If you insist on removing all svelte dependencies so that they do not pollute your workspace, you can perform the following steps. 1.
189
+
190
+
1. delete the
191
+
```json
192
+
{
193
+
"@sveltejs/vite-plugin-svelte": "^2.0.3",
194
+
"@tsconfig/svelte": "^4.0.1",
195
+
"svelte": "^3.57.0"
196
+
}
197
+
```
198
+
2. delete the `svelte.config.js` file
199
+
3. delete the following line from the `vite.config.js` file
200
+
- Line 6: `import { svelte } from "@sveltejs/vite-plugin-svelte"`
201
+
- Line 20: `svelte(),`
202
+
4. delete line 37 of `tsconfig.json` from `"svelte"` 5.
0 commit comments