🐛 Corrige le point d'entrée en double en mode dev

pull/2087/head
Maxime Quandalle 2022-04-06 11:01:39 +02:00
parent 78c8f10c7c
commit d325c095c8
3 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
},
"type": "module",
"private": true,
"main": "./source/entry-fr.tsx",
"main": "./source/entry-empty.js",
"engines": {
"node": ">=12.16.1"
},

View File

@ -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.

View File

@ -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