0.18.2 • Published 2 months ago

@thzero/library_client_svelte v0.18.2

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

License: MIT

library_client_svelte

Requirements

NodeJs

NodeJs version 18+

Svelte Application

npm create vite@latest myapp -- --template svelte cd myapp npm install npm run dev

Installation

NPM

// store.js
// An extremely simple external store
import { writable } from 'svelte/store'
export default writable(0)

jsconfig.json

    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    }

vite.config.js

import path from 'path'
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)
    resolve:{
        alias:{
        '@/': `${path.resolve(__dirname, 'src')}/`,
        'local-config': `${path.join(__dirname, `./src/config/${configEnv}.json`)}`
        },
    },
0.18.2

2 months ago

0.18.1

3 months ago

0.17.10

4 months ago

0.17.11

4 months ago

0.17.9

4 months ago

0.17.7

5 months ago

0.17.8

5 months ago

0.17.6

5 months ago

0.17.4

10 months ago

0.17.5

7 months ago

0.17.3

1 year ago

0.17.2

1 year ago

0.15.10

1 year ago

0.15.7

1 year ago

0.15.8

1 year ago

0.15.9

1 year ago

0.15.4

1 year ago

0.15.5

1 year ago

0.15.6

1 year ago

0.15.3

2 years ago

0.15.1

3 years ago

0.14.8

3 years ago

0.14.9

3 years ago

0.14.6

3 years ago

0.14.5

3 years ago

0.14.4

3 years ago

0.14.3

3 years ago

0.14.2

3 years ago