mirror of
https://github.com/betagouv/mon-entreprise
synced 2025-03-14 00:55:06 +00:00
Désormais nous utilisons un script NodeJS natif pour générer le code HTML pour le pré-rendu des pages. Cela est plus rapide et plus fiable que la méthode précédente qui consistait un instrumentaliser un navigateur (pupetter) https://github.com/chrisvfritz/prerender-spa-plugin Cela implique toutefois de faire attention à ne plus utiliser des variables gloables du navigateur, comme `window`, `document` ou `location` dans nos scripts. C'est plutôt une bonne pratique, mais il faudrait sans doute configurer du typage pour détecter ces usages le plus tôt possible et éviter de créer des erreurs inopinées avec le SSR.
142 lines
4.7 KiB
JSON
142 lines
4.7 KiB
JSON
{
|
|
"name": "site",
|
|
"license": "MIT",
|
|
"version": "2.0.0",
|
|
"description": "Code source du site mon-entreprise",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/betagouv/mon-entreprise.git",
|
|
"directory": "site"
|
|
},
|
|
"type": "module",
|
|
"private": true,
|
|
"engines": {
|
|
"node": ">=12.16.1"
|
|
},
|
|
"browserslist": [
|
|
"> 1% in FR",
|
|
"not ie < 11"
|
|
],
|
|
"scripts": {
|
|
"prepare": "node scripts/prepare.js",
|
|
"start": "vite dev",
|
|
"build": "vite build",
|
|
"build:ssr": "vite build --ssr ./source/entry-server.tsx --outDir ./dist/server --emptyOutDir && echo '{\"module\": \"commonjs\"}' > dist/package.json",
|
|
"build:prerender": "node prerender.cjs",
|
|
"serve:dev": "concurrently -k \"yarn run serve:dev:mon-entreprise\" \"yarn run serve:dev:infrance\"",
|
|
"serve:dev:mon-entreprise": "PORT=5000 serve --config serve.mon-entreprise.json --no-clipboard",
|
|
"serve:dev:infrance": "PORT=5001 serve --config serve.infrance.json --no-clipboard",
|
|
"typecheck:watch": "tsc --skipLibCheck --noEmit --watch",
|
|
"test": "vitest",
|
|
"test:dev-e2e:mon-entreprise": "cypress open --browser chromium",
|
|
"test:dev-e2e:mycompanyinfrance": "cypress open --browser chromium --config baseUrl=http://localhost:8080/infrance,integrationFolder=cypress/integration/mon-entreprise/english --env language=en",
|
|
"test:record-http-calls:mon-entreprise": "cypress run --env record_http=",
|
|
"algolia:update": "node scripts/search/update-data.js",
|
|
"algolia:clean": "node scripts/search/clean.js"
|
|
},
|
|
"resolutions": {
|
|
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
|
|
},
|
|
"dependencies": {
|
|
"@emotion/react": "^11.7.1",
|
|
"@emotion/styled": "^11.6.0",
|
|
"@icons/material": "^0.4.1",
|
|
"@internationalized/number": "^3.0.3",
|
|
"@mui/material": "^5.0.4",
|
|
"@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
|
|
"@react-aria/button": "^3.3.4",
|
|
"@react-aria/checkbox": "^3.2.3",
|
|
"@react-aria/dialog": "^3.1.4",
|
|
"@react-aria/i18n": "^3.3.2",
|
|
"@react-aria/numberfield": "^3.1.0",
|
|
"@react-aria/overlays": "^3.7.2",
|
|
"@react-aria/progress": "^3.1.3",
|
|
"@react-aria/radio": "^3.1.5",
|
|
"@react-aria/searchfield": "^3.2.0",
|
|
"@react-aria/select": "^3.5.0",
|
|
"@react-aria/ssr": "^3.1.0",
|
|
"@react-aria/textfield": "^3.4.0",
|
|
"@react-pdf/renderer": "^1.6.10",
|
|
"@react-stately/radio": "^3.3.2",
|
|
"@react-stately/searchfield": "^3.1.3",
|
|
"@react-stately/toggle": "^3.2.3",
|
|
"@rehooks/local-storage": "2.4.0",
|
|
"@sentry/react": "^6.3.5",
|
|
"@sentry/tracing": "^6.3.5",
|
|
"algoliasearch": "^4.10.2",
|
|
"fuse.js": "^6.4.6",
|
|
"iframe-resizer": "^4.1.1",
|
|
"markdown-to-jsx": "^7.1.5",
|
|
"modele-social": "^0.5.0",
|
|
"publicodes": "^1.0.0-beta.25",
|
|
"publicodes-react": "^1.0.0-beta.25",
|
|
"ramda": "^0.27.0",
|
|
"react": "^17.0.0",
|
|
"react-color": "^2.14.0",
|
|
"react-dom": "^17.0.0",
|
|
"react-easy-emoji": "^1.2.0",
|
|
"react-helmet-async": "^1.1.2",
|
|
"react-i18next": "^11.0.0",
|
|
"react-instantsearch": "^6.11.2",
|
|
"react-instantsearch-dom": "^6.11.2",
|
|
"react-redux": "^7.0.3",
|
|
"react-router-dom": "^5.1.1",
|
|
"react-signature-pad-wrapper": "^1.2.11",
|
|
"react-spring": "^9.3.1",
|
|
"react-syntax-highlighter": "^10.1.1",
|
|
"react-use-measure": "^2.0.4",
|
|
"react-useportal": "^1.0.13",
|
|
"recharts": "^1.8.5",
|
|
"reduce-reducers": "^1.0.4",
|
|
"redux": "^4.0.4",
|
|
"regenerator-runtime": "^0.13.3",
|
|
"reselect": "^4.0.0",
|
|
"styled-components": "^5.3.1",
|
|
"swr": "^0.1.16",
|
|
"whatwg-fetch": "^3.0.0",
|
|
"yaml": "^1.9.2"
|
|
},
|
|
"devDependencies": {
|
|
"@react-types/numberfield": "^3.1.0",
|
|
"@react-types/searchfield": "^3.1.2",
|
|
"@rollup/plugin-yaml": "^3.1.0",
|
|
"@types/iframe-resizer": "^3.5.7",
|
|
"@types/ramda": "^0.26.43",
|
|
"@types/react": "^17.0.0",
|
|
"@types/react-color": "^3.0.1",
|
|
"@types/react-dom": "^17.0.9",
|
|
"@types/react-instantsearch-dom": "^6.10.1",
|
|
"@types/react-redux": "^7.1.11",
|
|
"@types/react-router": "^5.1.2",
|
|
"@types/react-router-dom": "^5.3.2",
|
|
"@types/recharts": "^1.8.16",
|
|
"@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",
|
|
"cypress": "^7.7.0",
|
|
"cypress-plugin-tab": "^1.0.5",
|
|
"cypress-wait-until": "^1.7.2",
|
|
"dotenv": "=8.1.0",
|
|
"enzyme": "^3.3.0",
|
|
"enzyme-adapter-react-16": "^1.1.1",
|
|
"eslint": "^7.0.0",
|
|
"eslint-config-prettier": "^4.0.0",
|
|
"eslint-plugin-mocha": "^8.0.0",
|
|
"eslint-plugin-react": "^7.12.4",
|
|
"eslint-plugin-react-hooks": "^4.3.0",
|
|
"i18next-parser": "^5.3.0",
|
|
"isomorphic-fetch": "^2.2.1",
|
|
"prettier": "^2.3.2",
|
|
"rimraf": "^3.0.2",
|
|
"rollup-plugin-toml": "^1.0.0",
|
|
"serve": "^13.0.2",
|
|
"typescript": "^4.3.2",
|
|
"vite": "^2.7.7",
|
|
"vitest": "^0.0.116",
|
|
"xml2js": "^0.4.23"
|
|
}
|
|
}
|