From 90d561582cec9aa4270619b7d0165e9bd7e10f7f Mon Sep 17 00:00:00 2001 From: inshatan <46357926+inshatan@users.noreply.github.com> Date: Mon, 30 Sep 2024 23:59:46 +0300 Subject: [PATCH] vite.md: faulty documentation The latest version of the Vite plugin will not copy external dependencies. The documentation is outdated and will confuse users. --- config/plugins/vite.md | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/config/plugins/vite.md b/config/plugins/vite.md index a9138d0..ddb906e 100644 --- a/config/plugins/vite.md +++ b/config/plugins/vite.md @@ -122,24 +122,7 @@ If using the Vite template, this should be automatically set up for you. ### Native Node modules -If you used the [Vite](../../templates/vite.md) template to create your application, native modules will mostly work out of the box. However, to avoid possible build issues, we recommend instructing Vite to load them as external packages: - -{% code title="vite.main.config.js" %} -```javascript -import { defineConfig } from 'vite'; - -export default defineConfig({ - build: { - rollupOptions: { - external: [ - 'serialport', - 'sqlite3' - ] - } - } -}); -``` -{% endcode %} +If you used the [Vite](../../templates/vite.md) template to create your application, native modules will mostly work out of the box. However, we recommend copying external dependencies also to avoid possible build issues. ### Hot Module Replacement (HMR)