🚧 First svelte component

This commit is contained in:
wjtje 2023-01-17 18:31:51 +01:00 committed by Pieter Vander Vennet
parent 1c1df43bf9
commit 203d1b6b34
10 changed files with 809 additions and 668 deletions

View file

@ -1,5 +1,7 @@
const { defineConfig } = require("vite")
import { defineConfig } from "vite"
import { svelte } from "@sveltejs/vite-plugin-svelte"
import fs from "fs"
const allHtmlFiles = fs.readdirSync(".").filter((f) => f.endsWith(".html"))
const input = {}
const ASSET_URL = process.env.ASSET_URL || ""
@ -9,13 +11,14 @@ for (const html of allHtmlFiles) {
input[name] = "./" + html
}
module.exports = defineConfig({
export default defineConfig({
build: {
rollupOptions: {
input,
},
},
base: `${ASSET_URL}`,
plugins: [svelte()],
server: {
port: 1234,
},