veslx 0.1.26 → 0.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/lib/build.ts +7 -0
- package/package.json +1 -1
package/bin/lib/build.ts
CHANGED
|
@@ -125,6 +125,13 @@ export default async function buildApp(dir?: string) {
|
|
|
125
125
|
}
|
|
126
126
|
copyDirSync(tempOutDir, finalOutDir)
|
|
127
127
|
|
|
128
|
+
// Copy index.html to 404.html for SPA fallback routing
|
|
129
|
+
// This works with GitHub Pages, Netlify, and many static servers
|
|
130
|
+
fs.copyFileSync(
|
|
131
|
+
path.join(finalOutDir, 'index.html'),
|
|
132
|
+
path.join(finalOutDir, '404.html')
|
|
133
|
+
)
|
|
134
|
+
|
|
128
135
|
// Clean up temp build directory
|
|
129
136
|
fs.rmSync(tempOutDir, { recursive: true })
|
|
130
137
|
|