Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow macroCondition inside modifier #712

Merged
merged 1 commit into from
Mar 8, 2021

Commits on Mar 7, 2021

  1. Allow macroCondition inside modifier

    Previously the macro-if transform would already allow to switch between two modifier implementations with a `(if (macroCondition ...) foo bar)` sub-expression inside a modifier. This now also completely removes the modifier if the sub-expression statically evaluates to undefined, allowing you to conditionally apply modifiers. See embroider-build#680 (comment)
    
    Closes embroider-build#680, supersedes embroider-build#692.
    
    Note this only works with Ember 3.25, which now allows you to use a sub-expression as the modifier path, see embroider-build#680 (comment). Older versions would throw a parse error (not exactly sure at which version exactly the changes in the parser where introduced). Therefore I also had to replace the vendored template compiler (for tests) with that of Ember 3.25.
    simonihmig committed Mar 7, 2021
    Configuration menu
    Copy the full SHA
    e1d0040 View commit details
    Browse the repository at this point in the history