diff --git a/src/main/java/tech/jhipster/lite/generator/client/vite/react/core/domain/ViteReactDomainService.java b/src/main/java/tech/jhipster/lite/generator/client/vite/react/core/domain/ViteReactDomainService.java index 440e5c7d63a..d4978a333c5 100644 --- a/src/main/java/tech/jhipster/lite/generator/client/vite/react/core/domain/ViteReactDomainService.java +++ b/src/main/java/tech/jhipster/lite/generator/client/vite/react/core/domain/ViteReactDomainService.java @@ -89,15 +89,11 @@ public void addViteReactUnstyledFiles(Project project) { } public void addViteReactStyledFiles(Project project) { + String imagesPath = "src/main/webapp/content/images"; projectRepository.template(project, getPath(SOURCE, SOURCE_APP), "StyledApp.css", SOURCE_APP, "App.css"); projectRepository.template(project, getPath(SOURCE, SOURCE_APP), "StyledApp.tsx", SOURCE_APP, "App.tsx"); - projectRepository.add(project, getPath(SOURCE, "src/main/webapp/content.images"), "ReactLogo.png", "src/main/webapp/content/images"); - projectRepository.add( - project, - getPath(SOURCE, "src/main/webapp/content.images"), - "JHipster-Lite-neon-blue.png", - "src/main/webapp/content/images" - ); + projectRepository.add(project, getPath(SOURCE, imagesPath), "ReactLogo.png", imagesPath); + projectRepository.add(project, getPath(SOURCE, imagesPath), "JHipster-Lite-neon-blue.png", imagesPath); } public void addJestSonar(Project project) { diff --git a/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.css.mustache b/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.css.mustache index 4203fb45f83..4a1e11c0f15 100644 --- a/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.css.mustache +++ b/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.css.mustache @@ -1,23 +1,23 @@ - #app { - font-family: Avenir, Helvetica, Arial, sans-serif; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - text-align: center; - color: #2c3e50; - margin-top: 60px; - } - a { - color: #42b983; - } +#app { + font-family: Avenir, Helvetica, Arial, sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + text-align: center; + color: #2c3e50; + margin-top: 60px; +} +a { + color: #64dafb; +} - label { - margin: 0 0.5em; - font-weight: bold; - } +label { + margin: 0 0.5em; + font-weight: bold; +} - code { - background-color: #eee; - padding: 2px 4px; - border-radius: 4px; - color: #304455; - } +code { + background-color: #eee; + padding: 2px 4px; + border-radius: 4px; + color: #304455; +} diff --git a/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.tsx.mustache b/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.tsx.mustache index 4510be1a5eb..cb83565ac49 100644 --- a/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.tsx.mustache +++ b/src/main/resources/generator/client/vite/react/src/main/webapp/app/common/primary/app/StyledApp.tsx.mustache @@ -1,35 +1,41 @@ import './App.css'; function App() { -return ( -
- Recommended IDE setup: - VSCode - + - Volar -
+ return ( ++ Recommended IDE setup: + + VSCode + + + + + Volar + +
-- - React Documentation - - | - React Official -
++ + Vite Documentation + + | + + React Documentation + +
-
- Edit
- src/main/webapp/app/common/primary/app/App.vue
to test hot module replacement.
-
+ Edit
+ src/main/webapp/app/common/primary/app/App.tsx
to test hot module replacement.
+