Visually makeover
This commit is contained in:
+16
-1
@@ -26,6 +26,15 @@ async function loadManagedCatalogEnvelope(repoRoot) {
|
||||
|
||||
const buildStamp = `${Date.now()}`;
|
||||
|
||||
function htmlBuildVersionPlugin() {
|
||||
return {
|
||||
name: 'html-build-version',
|
||||
transformIndexHtml(html) {
|
||||
return html.replaceAll('__BUILD_STAMP__', buildStamp);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
function managedCatalogApiPlugin() {
|
||||
async function handleManagedCatalogRequest(req, res, next) {
|
||||
if (!req.url) {
|
||||
@@ -71,12 +80,18 @@ function managedCatalogApiPlugin() {
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react(), managedCatalogApiPlugin()],
|
||||
define: {
|
||||
__APP_BUILD_ID__: JSON.stringify(buildStamp),
|
||||
},
|
||||
plugins: [react(), managedCatalogApiPlugin(), htmlBuildVersionPlugin()],
|
||||
base: './',
|
||||
build: {
|
||||
minify: 'terser',
|
||||
rollupOptions: {
|
||||
input: {
|
||||
main: resolve(process.cwd(), 'index.html'),
|
||||
about: resolve(process.cwd(), 'about.html'),
|
||||
docs: resolve(process.cwd(), 'docs.html'),
|
||||
privacy: resolve(process.cwd(), 'privacy.html'),
|
||||
},
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user