Skip to content

Commit

Permalink
fix: Use correct URL for generated/vaadin.ts (#12352)
Browse files Browse the repository at this point in the history
Fixes #12351
  • Loading branch information
Artur- committed Nov 14, 2021
1 parent 2b77596 commit bc7e2a5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions flow-server/src/main/resources/vite.generated.ts
Expand Up @@ -71,6 +71,7 @@ function runWatchDog(watchDogPort) {

export const vaadinConfig: UserConfigFn = (env) => {
const devMode = env.mode === 'development';
const basePath = env.mode === 'production' ? '' : '/VAADIN/';

if (devMode && process.env.watchDogPort) {
// Open a connection with the Java dev-mode handler in order to finish
Expand All @@ -79,7 +80,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
}
return {
root: 'frontend',
base: env.mode === 'production' ? '' : '/VAADIN/',
base: basePath,
resolve: {
alias: {
themes: themeFolder,
Expand Down Expand Up @@ -116,7 +117,7 @@ export const vaadinConfig: UserConfigFn = (env) => {
}
const vaadinScript: HtmlTagDescriptor = {
tag: 'script',
attrs: { type: 'module', src: './generated/vaadin.ts' },
attrs: { type: 'module', src: devMode ? '/VAADIN/generated/vaadin.ts' : './generated/vaadin.ts' },
injectTo: 'head'
};
return [vaadinScript];
Expand Down

0 comments on commit bc7e2a5

Please sign in to comment.