From 737efb371b26b91f6da663d6664408dce5f81a27 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sat, 14 Jun 2025 22:09:06 +0200 Subject: vite configuration: aliases to absolute files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- vite.config.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vite.config.js') 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: { -- cgit v1.2.3