Skip to content

Commit c8e4592

Browse files
vaadin-botArtur-
andauthored
fix: Disable the Vite public directory to not interfere with a folder named 'public' (#17732) (#17743)
If you create a `src/main/resources/static/public` folder with static files, you will see a lot of ``` files in the public directory are served at the root path. Instead of /public/images/logo.jpg, use /images/logo.jpg. ``` when trying to access the files. This is because the default "publcDir" of Vite is "public" and the Vite server is queried for resources before loading from the class loader Co-authored-by: Artur <[email protected]>
1 parent 7877407 commit c8e4592

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flow-server/src/main/resources/vite.generated.ts

+1
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
665665
return {
666666
root: frontendFolder,
667667
base: '',
668+
publicDir: false,
668669
resolve: {
669670
alias: {
670671
'@vaadin/flow-frontend': jarResourcesFolder,

0 commit comments

Comments
 (0)