0.18.4 • Published 8 months ago
@thzero/library_client_svelte v0.18.4
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
// 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.4
8 months ago
0.18.3
1 year ago
0.18.2
1 year ago
0.18.1
1 year ago
0.17.10
1 year ago
0.17.11
1 year ago
0.17.9
1 year ago
0.17.7
1 year ago
0.17.8
1 year ago
0.17.6
2 years ago
0.17.4
2 years ago
0.17.5
2 years ago
0.17.3
2 years ago
0.17.2
2 years ago
0.15.10
2 years ago
0.15.7
3 years ago
0.15.8
3 years ago
0.15.9
3 years ago
0.15.4
3 years ago
0.15.5
3 years ago
0.15.6
3 years ago
0.15.3
3 years ago
0.15.1
4 years ago
0.14.8
4 years ago
0.14.9
4 years ago
0.14.6
4 years ago
0.14.5
4 years ago
0.14.4
4 years ago
0.14.3
4 years ago
0.14.2
4 years ago