diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-01-20 16:51:18 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-01-20 16:51:40 +0100 |
commit | 84fe041aa42981a3be4528170b324054b5438d5a (patch) | |
tree | 1361702dd2df0a5f4330a7c1418c7be1a6b4cac8 | |
parent | b6924ae728eafdba7436e1da776467cf6edd8c7c (diff) |
Vite configuration: Serve large external libraries in external chunks.
-rw-r--r-- | vite.config.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/vite.config.js b/vite.config.js index 668b49f..217b46c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -2,7 +2,16 @@ export default { build: { sourcemap: true, outDir: "dist", - assetsDir: "assets" + assetsDir: "assets", + rollupOptions: { + output: { + manualChunks: { + ol: ['ol'], + bootstrap: ['bootstrap'], + proj4: ['proj4'], + } + } + } }, css: { devSourcemap: true |