Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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