Move entry files into entries directory
parent
17a8763751
commit
2178a84932
|
@ -24,7 +24,7 @@
|
|||
"start:axe-debugging": "VITE_AXE_CORE_ENABLED=true vite dev",
|
||||
"start:netlify": "sed 's|:SITE_EN|/infrance|g' netlify.base.toml | sed 's|:SITE_FR|/mon-entreprise|g' | sed 's|:API_URL|http://localhost:3004|g' | sed 's|\\[\\[redirects\\]\\]|\\[\\[redirects\\]\\]\\n force = true|g' > netlify.toml && HMR_CLIENT_PORT=8888 netlify dev",
|
||||
"build": "NODE_OPTIONS='--max-old-space-size=6144'; yarn build:sitemap && yarn build:simulator-data && vite build && yarn build:iframe-script",
|
||||
"build:ssr": "NODE_OPTIONS='--max-old-space-size=4096'; vite build --ssr ./source/entry-server.tsx --outDir ./dist/ssr --emptyOutDir && echo '{\"type\": \"module\"}' > dist/package.json",
|
||||
"build:ssr": "NODE_OPTIONS='--max-old-space-size=4096'; vite build --ssr ./source/entries/entry-server.tsx --outDir ./dist/ssr --emptyOutDir && echo '{\"type\": \"module\"}' > dist/package.json",
|
||||
"build:prerender": "ts-node-esm prerender.ts",
|
||||
"build:simulator-data": "vite build --config vite-build-simulation-data.config.ts",
|
||||
"build:iframe-script": "NODE_OPTIONS='--max-old-space-size=4096'; vite build --config vite-iframe-script.config.ts",
|
||||
|
|
|
@ -2,13 +2,13 @@ import { I18nProvider } from '@react-aria/i18n'
|
|||
import { withProfiler } from '@sentry/react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
|
||||
import App from './App'
|
||||
import i18next from './locales/i18n'
|
||||
import ruleTranslations from './locales/rules-en.yaml'
|
||||
import translateRules from './locales/translateRules'
|
||||
import translations from './locales/ui-en.yaml'
|
||||
import App from '../App'
|
||||
import i18next from '../locales/i18n'
|
||||
import ruleTranslations from '../locales/rules-en.yaml'
|
||||
import translateRules from '../locales/translateRules'
|
||||
import translations from '../locales/ui-en.yaml'
|
||||
|
||||
import './sentry'
|
||||
import '../sentry'
|
||||
|
||||
export const AppEn = () => (
|
||||
<I18nProvider locale="en-GB">
|
|
@ -2,10 +2,10 @@ import { I18nProvider } from '@react-aria/i18n'
|
|||
import { withProfiler } from '@sentry/react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
|
||||
import App from './App'
|
||||
import i18next from './locales/i18n'
|
||||
import App from '../App'
|
||||
import i18next from '../locales/i18n'
|
||||
|
||||
import './sentry'
|
||||
import '../sentry'
|
||||
|
||||
export const AppFr = () => (
|
||||
<I18nProvider locale="fr-FR">
|
|
@ -9,9 +9,9 @@
|
|||
* aboutir à des bugs liés à une config de bundling différentes.
|
||||
**/
|
||||
|
||||
import { hexToHSL } from './hexToHSL'
|
||||
import { hexToHSL } from '../hexToHSL'
|
||||
// @ts-ignore ignore file not exist error
|
||||
import simulationData from './public/simulation-data-title.json'
|
||||
import simulationData from '../public/simulation-data-title.json'
|
||||
|
||||
const script = document.currentScript
|
||||
if (!script) {
|
|
@ -4,9 +4,9 @@ import { FilledContext, HelmetProvider } from 'react-helmet-async'
|
|||
import { StaticRouter } from 'react-router-dom/server'
|
||||
import { ServerStyleSheet, StyleSheetManager } from 'styled-components'
|
||||
|
||||
import i18next from '../locales/i18n'
|
||||
import { AppEn } from './entry-en'
|
||||
import { AppFr } from './entry-fr'
|
||||
import i18next from './locales/i18n'
|
||||
|
||||
export function render(url: string, lang: 'fr' | 'en') {
|
||||
const sheet = new ServerStyleSheet()
|
|
@ -9,7 +9,7 @@ export default defineConfig({
|
|||
},
|
||||
build: {
|
||||
lib: {
|
||||
entry: './source/entry-iframe.ts',
|
||||
entry: './source/entries/entry-iframe.ts',
|
||||
name: 'monEntrepriseIframe',
|
||||
formats: ['iife'],
|
||||
fileName: () => 'simulateur-iframe-integration.js',
|
||||
|
|
|
@ -5,7 +5,7 @@ export const pwaOptions: Partial<Options> = {
|
|||
registerType: 'prompt',
|
||||
strategies: 'injectManifest',
|
||||
srcDir: 'source',
|
||||
filename: 'entry-sw.ts',
|
||||
filename: 'entries/entry-sw.ts',
|
||||
injectManifest: {
|
||||
maximumFileSizeToCacheInBytes: 3000000,
|
||||
manifestTransforms: [
|
||||
|
|
|
@ -69,11 +69,11 @@ export default defineConfig(({ command, mode }) => ({
|
|||
}),
|
||||
multipleSPA({
|
||||
defaultSite: 'mon-entreprise',
|
||||
templatePath: './source/template.html',
|
||||
templatePath: './source/entries/template.html',
|
||||
sites: {
|
||||
'mon-entreprise': {
|
||||
lang: 'fr',
|
||||
entry: '/source/entry-fr.tsx',
|
||||
entry: '/source/entries/entry-fr.tsx',
|
||||
title:
|
||||
"mon-entreprise.urssaf.fr : L'assistant officiel du créateur d'entreprise",
|
||||
description:
|
||||
|
@ -83,7 +83,7 @@ export default defineConfig(({ command, mode }) => ({
|
|||
},
|
||||
infrance: {
|
||||
lang: 'en',
|
||||
entry: '/source/entry-en.tsx',
|
||||
entry: '/source/entries/entry-en.tsx',
|
||||
title:
|
||||
'My company in France: A step-by-step guide to start a business in France',
|
||||
description:
|
||||
|
@ -126,7 +126,7 @@ export default defineConfig(({ command, mode }) => ({
|
|||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
entries: ['./source/entry-fr.tsx', './source/entry-en.tsx'],
|
||||
entries: ['./source/entries/entry-fr.tsx', './source/entries/entry-en.tsx'],
|
||||
exclude: ['publicodes-react', 'publicodes'],
|
||||
},
|
||||
ssr: {
|
||||
|
|
Loading…
Reference in New Issue