From e158454e2799e8fa6567a6cd9dfbea0212e12320 Mon Sep 17 00:00:00 2001 From: Eduard Ten <54061864+katsu223@users.noreply.github.com> Date: Wed, 12 Jan 2022 19:41:29 +0500 Subject: [PATCH] Update backend-integration.md https://github.com/vitejs/vite/issues/4786 --- docs/guide/backend-integration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/guide/backend-integration.md b/docs/guide/backend-integration.md index a30831e735fff7..8dc172cea3abf7 100644 --- a/docs/guide/backend-integration.md +++ b/docs/guide/backend-integration.md @@ -26,7 +26,9 @@ If you need a custom integration, you can follow the steps in this guide to conf ```js // add the beginning of your app entry - import 'vite/modulepreload-polyfill' + if (import.meta.env.MODE !== 'development') { + import('vite/modulepreload-polyfill') + } ``` 2. For development, inject the following in your server's HTML template (substitute `http://localhost:3000` with the local URL Vite is running at):