Ajoute plugin-legacy pour les anciens navigateurs

pull/1967/head
Maxime Quandalle 2021-12-28 17:38:39 +01:00 committed by Maxime Quandalle
parent bb4106a8b5
commit e6e2ec2c9e
3 changed files with 7 additions and 2 deletions

View File

@ -110,6 +110,7 @@
"@types/styled-components": "^5.1.9",
"@typescript-eslint/eslint-plugin": "^4.0.1",
"@typescript-eslint/parser": "^4.0.1",
"@vitejs/plugin-legacy": "^1.6.4",
"@vitejs/plugin-react": "^1.1.0",
"babel-plugin-styled-components": "^1.10.7",
"concurrently": "^6.0.2",

View File

@ -235,4 +235,4 @@ const formatLegend = (key: string) =>
? 'simulation commencée'
: key === 'simulation_terminee'
? 'simulation terminée'
: key.replaceAll('_', ' ')
: key.replace(/_/g, ' ')

View File

@ -1,8 +1,9 @@
import yaml from '@rollup/plugin-yaml'
import legacy from '@vitejs/plugin-legacy'
import react from '@vitejs/plugin-react'
import { promises as fs } from 'fs'
import path from 'path'
import toml from 'rollup-plugin-toml'
import { promises as fs } from 'fs'
import { defineConfig, Plugin } from 'vite'
import { watchDottedNames } from '../modele-social/build.js'
@ -54,6 +55,9 @@ export default defineConfig({
},
},
}),
legacy({
targets: ['defaults', 'not IE 11'],
}),
],
})