aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-06-14 22:09:06 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-06-15 08:39:36 +0200
commit737efb371b26b91f6da663d6664408dce5f81a27 (patch)
treeb8eecc9c40690fbd37c9859e0c89b9e00a2a1fb8
parent5e3480f121c93792c3325882299c911ec01bcbba (diff)
vite configuration: aliases to absolute files.
This avoids the following warning: [vite] warning: rewrote […] to node_modules/[…] but was not an abolute path and was not handled by other plugins. This will lead to duplicated modules for the same path. To avoid duplicating modules, you should resolve to an absolute path.
-rw-r--r--vite.config.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/vite.config.js b/vite.config.js
index 68076e9..b0880df 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,3 +1,6 @@
+/* eslint-disable */
+import path from 'path';
+
export default {
build: {
sourcemap: true,
@@ -18,9 +21,9 @@ export default {
},
resolve: {
alias: {
- "~bootstrap": "node_modules/bootstrap",
- "~bootstrap-icons": "node_modules/bootstrap-icons",
- "~ol": "node_modules/ol",
+ "~bootstrap": path.resolve(__dirname, "node_modules/bootstrap"),
+ "~bootstrap-icons": path.resolve(__dirname, "node_modules/bootstrap-icons"),
+ "~ol": path.resolve(__dirname, "node_modules/ol"),
}
},
server: {