Правки для лучшей интеграции

This commit is contained in:
NikitaKalitov
2026-08-26 14:16:38 +03:00
parent 0d714ab38e
commit e8c05d307c
10 changed files with 453 additions and 123 deletions
+8 -1
View File
@@ -15,7 +15,14 @@ import react from '@vitejs/plugin-react'
// so this hashes and renames the file directly on disk after the whole build
// has finished writing it, rather than fighting the bundler's own emit step.
// Stable entry point for hosts: never hashed, always present next to the build.
const MANIFEST_FILE_NAME = 'app.json'
//
// Content is JSON, but the extension is .js on purpose: the Bitrix stand's
// nginx serves static straight from disk only for a fixed extension list
// (js|css|html|svg|png|...), and `json` is not in it — a .json file falls
// through to the Bitrix PHP router and comes back as a 404 HTML page
// (verified on the stand). `.js` is the one extension guaranteed to be served
// anywhere this build is deployed, since the build itself depends on it.
const MANIFEST_FILE_NAME = 'app-manifest.js'
function hashIndexHtml(): Plugin {
let outDir = 'dist'