forked from MapComplete/MapComplete
🚧 First svelte component
This commit is contained in:
parent
1c1df43bf9
commit
203d1b6b34
10 changed files with 809 additions and 668 deletions
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue