0.1.7 • Published 11 months ago

sveltekit-adapter-dotnetcore v0.1.7

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

sveltekit-adapter-dotnetcore

Adapter for SvelteKit apps that runs with standalone dotnetcore server, which requires jering-nodejs.

Usage

Install with npm i -D sveltekit-adapter-dotnetcore@next, then add the adapter to your svelte.config.js:

// svelte.config.js
import adapter from 'sveltekit-adapter-dotnetcore';

export default {
  kit: {
    adapter: adapter({
      // default options are shown
      out: 'build'
    })
  }
};

out parameter

The default output directory is set to build

dotnet sample app

  • Run pnpm to restore node packages.
pnpm install
  • build the adapter and sample svelte app (inside dotnet/razor)
pnpm -r build
  • to build and debug dotnet application with VS code, by hitting F5 with the .NET Core Launch (Web) profile; in the sample app, the about page is rendered in sveltekit using server side method

The site is running on https://localhost:5005/

  • for sveltekit HMR, just run npm run dev in the Razor folder

The about page is on http://localhost:3000/about

Dependencies

Please note the project is tested with node.js v16, which supports fetch.

It requires pnpm to be installed globally.

npm install -g pnpm

Next or TBD

Will improve aspnetcore Razor example

License

MIT

0.1.7

11 months ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

3 years ago