Skip to content

Webpack template project for svelte server side rendering tool

Notifications You must be signed in to change notification settings

gustarus/svelte-ssr-template-webpack

Repository files navigation

Svelte ssr tool webpack template with love hardcore

This template has been built specially for demonstration of cooperation between svelte, svelte-ssr and webpack to perform server side rendering requests. This is like sapper but not (🤷‍♀️).

screenshot

How to install it

1. Clone the repository

git clone https://github.com/gustarus/svelte-ssr-template-webpack.git

2. Step into the template folder

cd ./svelte-ssr-template-webpack

3. Install dependencies

If you are using nvm, switch to desired node.js version.

nvm install

Use npm to install dependencies.

npm install

How to use it

Launch development server

This command will launch webpack-dev-server for client and server entry points and node.js server to perform server side rendering requests.

npm start

Build for production

This command will launch webpack to build assets for client and server entry points.

npm run build

Launch production server

This command will launch only node.js server to serve compiled with npm run build assets.

npm run production

If you want to use different base path, pass base argument to the command. With the following command template will be served from localhost:3000/foo/.

npm run production -- --base /foo/ 

About

Webpack template project for svelte server side rendering tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published