fix(cli): properly migrate svelte to v5 in the plugin example template#13912
fix(cli): properly migrate svelte to v5 in the plugin example template#13912Legend-Master merged 3 commits intotauri-apps:devfrom
Conversation
|
I think maybe we should migrate the svelte files in the template to v5 properly instead? |
I agree with you. I figured it's more important for plugin developers to not get stuck early on, at least for now. I’m using AI to translate, so sorry if anything sounds strange grammatically. |
The actual question should be why are we even using svelte in the template. |
Package Changes Through 2b575f0There are 5 changes which include tauri-cli with minor, @tauri-apps/cli with minor, tauri-utils with minor, tauri with patch, tauri-plugin with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Honestly don't know 😂
No worries, seems like there are not many files to update, did the update in eb6fe90 |
|
@FabianLars do you prefer removing svelte from the template or just roll with the current change? (since I see a basic example template so I assume this is a more advanced example with frameworks) |
Yeah, honestly, I was wondering the same 😂 @Legend-Master Tauri is such an exciting project, and I'd love to contribute more. |
|
This is unrelated to the content of this PR, but I noticed that the following commit introduced major updates to commit: 24eb2b1 Steps to Reproduce# Create the plugin
npx @tauri-apps/cli plugin new my-plugin
# Build the plugin
cd tauri-plugin-my-plugin
npm install
npm run build
# Run the example app
cd examples/tauri-app
npm install
npm run tauri buildErrorI originally opened this PR to make it easier for plugin developers to get started, so if possible, I'd like to help resolve this issue as well. |
|
That sounds like vitejs/vite#20287, are you on an older node version? Not sure what can we do in tauri except for downgrading the vite in templates which I kinda don't want |
let's keep it for now. no need for hasty decisions here i think (not that we haven't already talked about svelte 100 times in the working group 🤣 ) |
Problem
Using the official CLI, I created a plugin following the steps below. However, when I ran the example app, the screen remained completely black with nothing displayed.
Steps to Reproduce
After accessing http://localhost:1420/, the page fails to render correctly and shows a completely black screen.
Solution
I modified vite.config.js as follows to support Svelte 4:
Significance of This Change
With this fix, the plugin template generated by the official Tauri CLI will now work out of the box in Svelte 4 environments, preventing developers from running into issues at the initial setup stage.