Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a VS template for vite+svelte #3

Open
robertovanoli opened this issue Jan 25, 2023 · 1 comment
Open

a VS template for vite+svelte #3

robertovanoli opened this issue Jan 25, 2023 · 1 comment

Comments

@robertovanoli
Copy link

robertovanoli commented Jan 25, 2023

hi @nelsontkq this is the only template I've found for VS and aspnet 6 so far and it's working great, so Thankyou for publishing.

I installed your template with dotnet new --install Nelsontkq.Svelte then created a .net core app dotnet new svelte.

This installed a svelte-kit app (not a svelte app as the name might suggest). The svelte.config.js has configs that are specific to svelte-kit.
image

Following your template, i'm trying to create an asp.net 6.0 project integrated with a svelte app (actually a vite+svelte app)

  • dotnet new svelte
  • rd ClientApp
  • npm init vite
  • image

then I've tried to modify the svelte.config.js for my vite+svelte app in this way:
image

using npm run dev the server starts correctly, but the proxy configurations are not set.

I'm quite new to svelte, Please can you suggest the exact config names to be used in svelte.config.js for my scenario?
or maybe it's possible to deploy TWO templates, one for the sveltekit+svelte scenario and one for the vite+svelte scenario?

thankyou very much RV

@robertovanoli robertovanoli changed the title a template for vite+svelte a VS template for vite+svelte Jan 25, 2023
@nelsontkq
Copy link
Owner

I would guess that the issue that's occurring there is the port not being setup correctly. In this template the .csproj sets the spa proxy to https://localhost:44447. You can change it in the csproj or in the svelte config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants