svelte-ssr-template-webpack Svelte Themes

Svelte Ssr Template Webpack

Webpack template project for svelte server side rendering tool

Svelte ssr tool webpack template

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 (🤷‍♀️).

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/ 

Top categories

Loading Svelte Themes