🔧 fix: update template handling and svelte compiler options for improved build process

This commit is contained in:
2025-10-30 09:11:44 +00:00
parent 1ae34d6a18
commit 2025a0a71f
4 changed files with 6 additions and 7 deletions

View File

@@ -59,7 +59,9 @@ jobs:
sed -i s/__TIMESTAMP__/$stamp/g frontend/spa.html
# sed -i s/__TIMESTAMP__/$stamp/g frontend/serviceworker.js
# cat frontend/serviceworker.js
rm api/templates/spa.html
test -d api/templates && test -f api/templates/spa.html && rm api/templates/spa.html
test -d api/templates && cp frontend/spa.html api/templates/spa.html
cp frontend/spa.html api/templates/spa.html
echo ______ frontend/spa.html ______
cat frontend/spa.html

View File

@@ -9,8 +9,7 @@ config.options.splitting = false
config.options.plugins = [
config.sveltePlugin({
compilerOptions: {
css: false,
hydratable: false,
css: "external",
dev: (process.argv?.length > 2 ? process.argv[2] : "build") !== "build",
},
preprocess: svelteConfig.preprocess,

View File

@@ -33,7 +33,6 @@ const svelteConfig = require("./svelte.config")
const esbuildSvelte = sveltePlugin({
compilerOptions: {
css: "external",
hydratable: true,
dev: (process.argv?.length > 2 ? process.argv[2] : "build") !== "build",
},
preprocess: svelteConfig.preprocess,

View File

@@ -13,9 +13,8 @@ config.options.outfile = __dirname + "/_temp/app.server.js"
config.options.plugins = [
config.sveltePlugin({
compilerOptions: {
generate: "ssr",
css: false,
hydratable: true,
generate: "server",
css: "external",
dev: (process.argv?.length > 2 ? process.argv[2] : "build") !== "build",
},
preprocess: svelteConfig.preprocess,