Download frontend/scripts/postbuild.js from leowuming/rag: direct link, hf CLI and curl.
- Browser
- Download file 410 Bytes
-
https://huggingface.co/spaces/leowuming/rag/resolve/main/frontend/scripts/postbuild.js
- Command line
-
hf download hf://spaces/leowuming/rag/frontend/scripts/postbuild.js
-
curl -L -o postbuild.js https://huggingface.co/spaces/leowuming/rag/resolve/main/frontend/scripts/postbuild.js
410 Bytes
| import { renameSync } from 'fs'; | |
| import { fileURLToPath } from 'url'; | |
| import path from 'path'; | |
| const __dirname = path.dirname(fileURLToPath(import.meta.url)); | |
| console.log(`Running frontend post build script...`) | |
| renameSync(path.resolve(__dirname, '../dist/index.html'), path.resolve(__dirname, '../dist/_index.html')); | |
| console.log(`index.html renamed to _index.html so SSR of the index page can be assumed.`); |