mirror of
https://github.com/strapi/strapi.git
synced 2025-06-27 00:41:25 +00:00
Fix Vite HMR Server Restart (#20617)
This commit is contained in:
parent
4e90afaca7
commit
ee2f2d6535
@ -5,8 +5,6 @@ const config = {
|
|||||||
locales: ['it', 'es', 'en'],
|
locales: ['it', 'es', 'en'],
|
||||||
};
|
};
|
||||||
const bootstrap = (app) => {
|
const bootstrap = (app) => {
|
||||||
console.log('I AM BOOTSTRAPPED');
|
|
||||||
|
|
||||||
app.getPlugin('content-manager').injectComponent('editView', 'right-links', {
|
app.getPlugin('content-manager').injectComponent('editView', 'right-links', {
|
||||||
name: 'PreviewButton',
|
name: 'PreviewButton',
|
||||||
Component: () => (
|
Component: () => (
|
||||||
|
@ -613,7 +613,7 @@
|
|||||||
"components.InputSelect.option.placeholder": "Choose here",
|
"components.InputSelect.option.placeholder": "Choose here",
|
||||||
"components.ListRow.empty": "There is no data to be shown.",
|
"components.ListRow.empty": "There is no data to be shown.",
|
||||||
"components.NotAllowedInput.text": "No permissions to see this field",
|
"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.description.serverError": "The server should have restarted, please check your logs in the terminal.",
|
||||||
"components.OverlayBlocker.title": "Waiting for restart...",
|
"components.OverlayBlocker.title": "Waiting for restart...",
|
||||||
"components.OverlayBlocker.title.serverError": "The restart is taking longer than expected",
|
"components.OverlayBlocker.title.serverError": "The restart is taking longer than expected",
|
||||||
|
@ -77,7 +77,7 @@ const AutoReloadOverlayBlockerProvider = ({ children }: AutoReloadOverlayBlocker
|
|||||||
let description = {
|
let description = {
|
||||||
id: config?.description || 'components.OverlayBlocker.description',
|
id: config?.description || 'components.OverlayBlocker.description',
|
||||||
defaultMessage:
|
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 = {
|
let title = {
|
||||||
|
@ -527,7 +527,7 @@ export const FormModal = () => {
|
|||||||
if (canEditContentType(allDataSchema, modifiedData)) {
|
if (canEditContentType(allDataSchema, modifiedData)) {
|
||||||
onCloseModal();
|
onCloseModal();
|
||||||
|
|
||||||
submitData(modifiedData);
|
await submitData(modifiedData);
|
||||||
} else {
|
} else {
|
||||||
toggleNotification({
|
toggleNotification({
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
|
@ -87,7 +87,7 @@ const resolveDevelopmentConfig = async (ctx: BuildContext): Promise<InlineConfig
|
|||||||
server: {
|
server: {
|
||||||
middlewareMode: true,
|
middlewareMode: true,
|
||||||
open: ctx.options.open,
|
open: ctx.options.open,
|
||||||
hmr: true,
|
hmr: { server: ctx.strapi.server.httpServer },
|
||||||
},
|
},
|
||||||
appType: 'custom',
|
appType: 'custom',
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user