mirror of
https://github.com/storytold/artcraft.git
synced 2026-10-31 15:37:49 +00:00
netlify configs
This commit is contained in:
1 parent
914c2532ec
commit
bf373b1d5c
3 files changed
+34
No files matched your search
@@ -0,0 +1,2 @@
|
||||
# SPA fallback: serve index.html for any path so deep links / refreshes work.
|
||||
/* /index.html 200
|
||||
@@ -0,0 +1,16 @@
|
||||
# Netlify config for the video-info-website (Nx + Vite SPA).
|
||||
#
|
||||
# All paths are relative to the site's **base directory**, which must be set to
|
||||
# `frontend` in the Netlify UI (Site config → Build & deploy → Base directory).
|
||||
# That's the Nx workspace root, so `npx nx` and node_modules resolve correctly.
|
||||
|
||||
[build]
|
||||
command = "./apps/video-info-website/script/netlify_build.sh"
|
||||
publish = "apps/video-info-website/dist/"
|
||||
|
||||
# Vite emits content-hashed files under dist/assets — safe to cache forever.
|
||||
[[headers]]
|
||||
for = "/assets/*"
|
||||
|
||||
[headers.values]
|
||||
"Cache-Control" = "public, max-age=31536000, immutable"
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
# Runs from the Netlify base directory (= the Nx workspace root, `frontend/`).
|
||||
|
||||
echo "Building video-info-website"
|
||||
npx nx build @frontend/video-info-website
|
||||
|
||||
echo "Copy netlify configs into dist"
|
||||
pushd apps/video-info-website/
|
||||
cp _redirects dist/
|
||||
popd
|
||||
|
||||
echo "Final build files:"
|
||||
find apps/video-info-website/dist/
|
||||
Reference in new issue
Block a user