* Move src under playlet-lib * Update configuration * Update script * Update script * Working version * Vs code config WIP * Package lock sync * Lint fix * Fix images * Reuse config files * Kind of a working setup * Lock node version * Rename scripts to tools * Fix build scripts, lib url system * Lint fix * rale * Fix args and web server * Load fallbacks and build script cleanups * Remove unused method * no message * no message * Remove generic message field * Lint fix * no message * Use loading indicator on main app * Add playlet lib version to settings --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
25 lines
638 B
TypeScript
25 lines
638 B
TypeScript
import { defineConfig } from 'vite'
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
import { readFileSync } from 'fs'
|
|
import { parse as dotEnvParse } from 'dotenv'
|
|
import { internalIpV4Sync } from 'internal-ip';
|
|
|
|
const envVars = dotEnvParse(readFileSync('../.vscode/.env'))
|
|
|
|
const PORT = 5173
|
|
|
|
// https://vitejs.dev/config/
|
|
/** @type {import('vite').UserConfig} */
|
|
export default defineConfig({
|
|
plugins: [svelte()],
|
|
build: {
|
|
outDir: "../playlet-lib/src/www",
|
|
emptyOutDir: true
|
|
},
|
|
server: {
|
|
host: true,
|
|
port: PORT,
|
|
open: `http://${internalIpV4Sync()}:${PORT}/?host=${envVars.ROKU_DEV_TARGET}:8888`
|
|
}
|
|
})
|