Fix Vite HMR Server Restart (#20617)

This commit is contained in:
Jean-Sébastien Herbaux 2024-06-25 14:56:54 +02:00 committed by GitHub
parent 4e90afaca7
commit ee2f2d6535
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 4 additions and 6 deletions

View File

@ -5,8 +5,6 @@ const config = {
locales: ['it', 'es', 'en'],
};
const bootstrap = (app) => {
console.log('I AM BOOTSTRAPPED');
app.getPlugin('content-manager').injectComponent('editView', 'right-links', {
name: 'PreviewButton',
Component: () => (

View File

@ -613,7 +613,7 @@
"components.InputSelect.option.placeholder": "Choose here",
"components.ListRow.empty": "There is no data to be shown.",
"components.NotAllowedInput.text": "No permissions to see this field",
"components.OverlayBlocker.description": "You're using a feature that needs the server to restart. Please wait until the server is up.",
"components.OverlayBlocker.description": "You're using a feature that needs the server to restart. The page will reload automatically.",
"components.OverlayBlocker.description.serverError": "The server should have restarted, please check your logs in the terminal.",
"components.OverlayBlocker.title": "Waiting for restart...",
"components.OverlayBlocker.title.serverError": "The restart is taking longer than expected",

View File

@ -77,7 +77,7 @@ const AutoReloadOverlayBlockerProvider = ({ children }: AutoReloadOverlayBlocker
let description = {
id: config?.description || 'components.OverlayBlocker.description',
defaultMessage:
"You're using a feature that needs the server to restart. Please wait until the server is up.",
"You're using a feature that needs the server to restart. The page will reload automatically.",
};
let title = {

View File

@ -527,7 +527,7 @@ export const FormModal = () => {
if (canEditContentType(allDataSchema, modifiedData)) {
onCloseModal();
submitData(modifiedData);
await submitData(modifiedData);
} else {
toggleNotification({
type: 'danger',

View File

@ -87,7 +87,7 @@ const resolveDevelopmentConfig = async (ctx: BuildContext): Promise<InlineConfig
server: {
middlewareMode: true,
open: ctx.options.open,
hmr: true,
hmr: { server: ctx.strapi.server.httpServer },
},
appType: 'custom',
};