https://github.com/tommywalkie/sapper-typescript-esbuild-template
Sapper template with ESBuild and TypeScript
https://github.com/tommywalkie/sapper-typescript-esbuild-template
esbuild rollup sapper svelte typescript
Last synced: 20 days ago
JSON representation
Sapper template with ESBuild and TypeScript
- Host: GitHub
- URL: https://github.com/tommywalkie/sapper-typescript-esbuild-template
- Owner: tommywalkie
- License: mit
- Created: 2020-09-07T15:09:09.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-08-30T16:52:52.000Z (11 months ago)
- Last Synced: 2025-04-08T01:42:40.201Z (3 months ago)
- Topics: esbuild, rollup, sapper, svelte, typescript
- Language: TypeScript
- Homepage:
- Size: 282 KB
- Stars: 19
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sapper Typescript ESBuild
This is a minimal Sapper project template, inspired by [@babichjacob](https://github.com/babichjacob)'s [`sapper-typescript-graphql-template`](https://github.com/babichjacob/sapper-typescript-graphql-template), which uses `@rollup/plugin-typescript` and `@rollup/plugin-babel`, which are ditched in favor of `rollup-plugin-esbuild` in this template to increase performance, while `tsc` and `svelte-check` will type-check source files in parallel.
### Getting started
```bash
npm install
npm run dev
```### Export
```bash
npm run export
```### Caveats
- Server code minification is disabled if using Sapper `0.28.1` or newer, due to a known issue with ESBuild ([#3](https://github.com/tommywalkie/sapper-typescript-esbuild-template/issues/3)).
- Normal comments inside `` tags in `.svelte` files are treated as docstrings by `svelte-check`, leading to type errors (`'render' implicitly has return type 'any' because [...]`), except the [first comment](https://github.com/jasonlyu123/language-tools/blob/a7b1b51d1adbb17b07e59e085a057ea90278bd4e/packages/svelte2tsx/src/svelte2tsx/nodes/ExportedNames.ts#L56-L59).