Skip to content

fix: add missing registerStyles import to generated app-shell-imports.js - #23975

Merged
mcollovati merged 1 commit into
mainfrom
fix/app-shell-imports-ordering
Mar 26, 2026
Merged

mcollovati merged 1 commit into
mainfrom
fix/app-shell-imports-ordering

Conversation

@mcollovati

Copy link
Copy Markdown
Collaborator

The generated app-shell-imports.js file was missing the THEMABLE_MIXIN_IMPORT line (import { css, unsafeCSS, registerStyles }), causing ReferenceError: registerStyles is not defined at startup in production mode when @CssImport with themeFor was used on an AppShellConfigurator.

Also ensures import statements are moved to the top of the generated app shell file, consistent with other generated import files.

Fixes #23689

@mcollovati mcollovati added target/25.0 Cherry-pick to 25.0 branch target/25.1 labels Mar 24, 2026
@github-actions

github-actions Bot commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 1 386 files  ±0   1 386 suites  ±0   1h 27m 21s ⏱️ -47s
 9 927 tests +2   9 856 ✅ +2  71 💤 ±0  0 ❌ ±0 
10 400 runs  +2  10 320 ✅ +2  80 💤 ±0  0 ❌ ±0 

Results for commit 95dcb2a. ± Comparison against base commit 91c9896.

♻️ This comment has been updated with latest results.

caalador
caalador previously approved these changes Mar 26, 2026
…ts.js

The generated `app-shell-imports.js` file was missing the
`THEMABLE_MIXIN_IMPORT` line (`import { css, unsafeCSS, registerStyles }`),
causing `ReferenceError: registerStyles is not defined` at startup in
production mode when `@CssImport` with `themeFor` was used on an
`AppShellConfigurator`.

Also ensures import statements are moved to the top of the generated
app shell file, consistent with other generated import files.

Fixes #23689
@sonarqubecloud

Copy link
Copy Markdown

@mcollovati
mcollovati merged commit e24c71c into main Mar 26, 2026
31 of 32 checks passed
@mcollovati
mcollovati deleted the fix/app-shell-imports-ordering branch March 26, 2026 10:29
vaadin-bot pushed a commit that referenced this pull request Mar 26, 2026
…ts.js (#23975)

The generated `app-shell-imports.js` file was missing the
`THEMABLE_MIXIN_IMPORT` line (`import { css, unsafeCSS, registerStyles }`),
causing `ReferenceError: registerStyles is not defined` at startup in
production mode when `@CssImport` with `themeFor` was used on an
`AppShellConfigurator`.

Also ensures import statements are moved to the top of the generated
app shell file, consistent with other generated import files.

Fixes #23689
@vaadin-bot

Copy link
Copy Markdown
Collaborator

Hi @mcollovati and @mcollovati, when i performed cherry-pick to this commit to 25.0, i have encountered the following issue. Can you take a look and pick it manually?
Error Message:
Error: Command failed: git cherry-pick e24c71c
error: could not apply e24c71c... fix: add missing registerStyles import to generated app-shell-imports.js (#23975)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".

mcollovati added a commit that referenced this pull request Mar 26, 2026
…ts.js (#23975)

The generated `app-shell-imports.js` file was missing the
`THEMABLE_MIXIN_IMPORT` line (`import { css, unsafeCSS, registerStyles }`),
causing `ReferenceError: registerStyles is not defined` at startup in
production mode when `@CssImport` with `themeFor` was used on an
`AppShellConfigurator`.

Also ensures import statements are moved to the top of the generated
app shell file, consistent with other generated import files.

Fixes #23689
vaadin-bot added a commit that referenced this pull request Mar 26, 2026
…ts.js (#23975) (#24019)

The generated `app-shell-imports.js` file was missing the
`THEMABLE_MIXIN_IMPORT` line (`import { css, unsafeCSS, registerStyles }`),
causing `ReferenceError: registerStyles is not defined` at startup in
production mode when `@CssImport` with `themeFor` was used on an
`AppShellConfigurator`.

Also ensures import statements are moved to the top of the generated
app shell file, consistent with other generated import files.

Fixes #23689

Co-authored-by: Marco Collovati <marco@vaadin.com>
caalador pushed a commit that referenced this pull request Mar 26, 2026
…ts.js (#23975) (#24020)

The generated `app-shell-imports.js` file was missing the
`THEMABLE_MIXIN_IMPORT` line (`import { css, unsafeCSS, registerStyles }`),
causing `ReferenceError: registerStyles is not defined` at startup in
production mode when `@CssImport` with `themeFor` was used on an
`AppShellConfigurator`.

Also ensures import statements are moved to the top of the generated
app shell file, consistent with other generated import files.

Fixes #23689
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CssImport with themeFor does not work in production mode.

3 participants