build(editor): Skip config endpoint insertion in local dev (no-changelog) (#17378)

This commit is contained in:
Suguru Inoue
2025-07-16 20:44:14 +02:00
committed by GitHub
parent c159e2be5c
commit 1e82350963
2 changed files with 11 additions and 1 deletions

View File

@@ -115,6 +115,16 @@ const plugins = [
modernPolyfills: true,
renderLegacyChunks: false,
}),
{
name: 'Insert config script',
transformIndexHtml: (html, ctx) => {
const replacement = ctx.server
? '' // Skip when using Vite dev server
: '<script src="/{{REST_ENDPOINT}}/config.js"></script>';
return html.replace('%CONFIG_SCRIPT%', replacement);
},
},
];
const { RELEASE: release } = process.env;