Skip to content

Commit be28afc

Browse files
authored
fix: provide correct devMode flag to theme-generator with Vite (#14230) (#14231)
devMode flag was hard-coded to false in theme options, preventing the theme generator plugin to work correctly when styles.css does not exist Fixes #14228
1 parent 8a17462 commit be28afc

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,11 @@ export { ${exports.map((binding) => `${binding} as ${binding}`).join(', ')} };`;
325325
}
326326

327327
function themePlugin(opts): PluginOption {
328+
const fullThemeOptions = {...themeOptions, devMode: opts.devMode };
328329
return {
329330
name: 'vaadin:theme',
330331
config() {
331-
processThemeResources(themeOptions, console);
332+
processThemeResources(fullThemeOptions, console);
332333
},
333334
handleHotUpdate(context) {
334335
const contextPath = path.resolve(context.file);
@@ -339,7 +340,7 @@ function themePlugin(opts): PluginOption {
339340
console.debug('Theme file changed', changed);
340341

341342
if (changed.startsWith(settings.themeName)) {
342-
processThemeResources(themeOptions, console);
343+
processThemeResources(fullThemeOptions, console);
343344
}
344345
}
345346
},

0 commit comments

Comments
 (0)