Skip to content

Commit

Permalink
vite.md: faulty documentation
Browse files Browse the repository at this point in the history
The latest version of the Vite plugin will not copy external dependencies. The documentation is outdated and will confuse users.
  • Loading branch information
inshatan authored Sep 30, 2024
1 parent 3910e57 commit 90d5615
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions config/plugins/vite.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 90d5615

Please sign in to comment.