# @thzero/library_client_svelte

> An opinionated library of common functionality to bootstrap a Svelte based SPA application.

Latest version **0.18.16** (published 2026-10-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @thzero/library_client_svelte
pnpm add @thzero/library_client_svelte
yarn add @thzero/library_client_svelte
bun add @thzero/library_client_svelte
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.18.16 |
| Published | 2026-10-03 |
| First published | 2021-09-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 16.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | thZero |
| Maintainers | thzero |

## Links

- npm: https://www.npmjs.com/package/@thzero/library_client_svelte
- Repository: https://github.com/thzero/library_client_svelte
- Homepage: https://github.com/thzero/library_client_svelte#readme
- Issues: https://github.com/thzero/library_client_svelte/issues
- npm.io page: https://npm.io/package/@thzero/library_client_svelte

## Dependencies (5)

- [mitt](https://npm.io/package/mitt.md) ^3.0.1
- [svelte-i18n](https://npm.io/package/svelte-i18n.md) ^4.0.1
- [svelte-spa-router](https://npm.io/package/svelte-spa-router.md) ^5.1.1
- [@thzero/library_client](https://npm.io/package/@thzero/library_client.md) ^0.19
- [@thzero/library_common](https://npm.io/package/@thzero/library_common.md) ^0.19

## Recent versions

- 0.18.16 (latest) — 2026-10-03
- 0.18.15 — 2026-07-20
- 0.18.14 — 2026-05-23
- 0.18.10 — 2026-04-21
- 0.18.9 — 2026-02-07
- 0.18.6 — 2026-02-06
- 0.18.5 — 2025-10-15
- 0.18.4 — 2024-10-31
- 0.18.3 — 2024-06-07
- 0.18.2 — 2024-03-26
- 0.18.1 — 2024-02-25
- 0.17.11 — 2024-01-15
- 0.17.10 — 2024-01-14
- 0.17.9 — 2024-01-01
- 0.17.8 — 2023-12-27
- … 22 more at https://npm.io/package/@thzero/library_client_svelte/versions

## README

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

# library_client_svelte

## Requirements

### NodeJs

[NodeJs](https://nodejs.org) version 18+

### Svelte Application

npm create vite@latest myapp -- --template svelte
cd myapp
npm install
npm run dev

### Installation

[![NPM](https://nodei.co/npm/@thzero/library_client_svelte.png?compact=true)](https://npmjs.org/package/@thzero/library_client_svelte)


```js
// store.js
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)
```

jsconfig.json
```js
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    }
```

vite.config.js
```js
import path from 'path'
```
```js
let configEnv = process.env.NODE_ENV
console.log('svelte.config.NODE_ENV', configEnv)
const config = process.env._CONFIG
console.log('svelte.config._CONFIG', config)
if (config) {
	const filename = path.join(__dirname, `./src/config/${configEnv}.json`)
	console.log('svelte.config.filename', filename)
	fs.writeFileSync(filename, config)
	const contents = fs.readFileSync(filename, 'utf8')
	console.log('svelte.config.file', contents)
}
else
	configEnv = 'development'
console.log('svelte.config.NODE_ENV', configEnv)
```
```js
    resolve:{
        alias:{
        '@/': `${path.resolve(__dirname, 'src')}/`,
        'local-config': `${path.join(__dirname, `./src/config/${configEnv}.json`)}`
        },
    },
```

---
_Source: https://npm.io/package/@thzero/library_client_svelte · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
