From d325c095c889864c107b8702eecb96269d5086d7 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Wed, 6 Apr 2022 11:01:39 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Corrige=20le=20point=20d'entr?= =?UTF-8?q?=C3=A9e=20en=20double=20en=20mode=20dev?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/package.json | 2 +- site/source/entry-empty.js | 3 +++ site/vite.config.ts | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 site/source/entry-empty.js diff --git a/site/package.json b/site/package.json index 2185c2a63..018cea163 100644 --- a/site/package.json +++ b/site/package.json @@ -10,7 +10,7 @@ }, "type": "module", "private": true, - "main": "./source/entry-fr.tsx", + "main": "./source/entry-empty.js", "engines": { "node": ">=12.16.1" }, diff --git a/site/source/entry-empty.js b/site/source/entry-empty.js new file mode 100644 index 000000000..5409001a3 --- /dev/null +++ b/site/source/entry-empty.js @@ -0,0 +1,3 @@ +// TODO: for some reason (ViteJS bug or missconfiguration on our side?) we need +// to define a entry file in the "main" field of package.json. We should remove +// this empty file when this problem is fixed. diff --git a/site/vite.config.ts b/site/vite.config.ts index 5b7761a73..5da77beed 100644 --- a/site/vite.config.ts +++ b/site/vite.config.ts @@ -106,9 +106,6 @@ export default defineConfig(({ command }) => ({ }, }, optimizeDeps: { - // TODO: for some reason (ViteJS bug?) we need to define a entry file in the - // "main" field of package.json. Ideally this shouldn't be required. It's - // not possible to write comments in package.json here it is. entries: ['./source/entry-fr.tsx', './source/entry-en.tsx'], exclude: ['publicodes-react', 'publicodes'], // Optimize cjs deps from publicodes