Skip to content

Conversation

@roncodes
Copy link
Member

@roncodes roncodes commented Dec 6, 2025

This fixes production build failures where engines try to compile CSS with ember-ui's import paths even though treeForStyles returns null.

Problem:

  • included() hook runs BEFORE tree deduplication
  • Engines were getting postcssOptions with ember-ui import paths
  • treeForStyles returned null (no CSS files)
  • Engines tried to compile with imports that don't exist
  • clean-css failed: 'Broken @import declaration'

Solution:

  • Detect if parent is an engine in included()
  • Return early without setting postcssOptions
  • Engines inherit postcssOptions from host app instead
  • Only host app gets ember-ui's postcss configuration

Result:

  • ember-ui styles compiled once in host app
  • Engines don't try to recompile
  • No CSS duplication
  • Production builds succeed

roncodes and others added 2 commits December 6, 2025 03:46
This fixes production build failures where engines try to compile CSS with
ember-ui's import paths even though treeForStyles returns null.

Problem:
- included() hook runs BEFORE tree deduplication
- Engines were getting postcssOptions with ember-ui import paths
- treeForStyles returned null (no CSS files)
- Engines tried to compile with imports that don't exist
- clean-css failed: 'Broken @import declaration'

Solution:
- Detect if parent is an engine in included()
- Return early without setting postcssOptions
- Engines inherit postcssOptions from host app instead
- Only host app gets ember-ui's postcss configuration

Result:
- ember-ui styles compiled once in host app
- Engines don't try to recompile
- No CSS duplication
- Production builds succeed
@roncodes roncodes merged commit 4f45d72 into main Dec 6, 2025
1 check passed
@roncodes roncodes deleted the fix/engine-postcss-options-override branch December 6, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants