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

Fix missing options in htmlbars-ast-plugin #177

Closed
wants to merge 1 commit into from
Closed

Fix missing options in htmlbars-ast-plugin #177

wants to merge 1 commit into from

Conversation

FabHof
Copy link

@FabHof FabHof commented Feb 19, 2020

This fixes #166

The problem is as follows: When using ember-css-modules in an ember-addon, the options are added in the included function of the ember-addon, and is therefore not available when setupPreprocessorRegistry of ember-css-modules is run. So the htmlbars-ast-plugin did not get the information about virtualModules.

This fix uses a bound function instead of an options object. I don't know anything about the ember-cli API, so there is probably a better solution.

@FabHof FabHof requested a review from dfreeman February 19, 2020 15:50
@FabHof FabHof changed the title Fix #166 Fix missing options in htmlbars-ast-plugin Feb 19, 2020
@dfreeman
Copy link
Member

dfreeman commented Apr 7, 2020

Hi @FabHof, thanks for the PR! Unfortunately all configuration for Babel and Glimmer/HTMLBars plugins has to be JSON-serializable in order for the CLI to be able to spin up multiple workers and process files in parallel, so passing through a closure to fetch the needed data later is unfortunately a non-starter.

I'm going to close this out, but I'll write up a suggestion in #166 for a possible workaround. I'm sorry for how long this has taken to get resolved! The chicken-and-egg ordering concerns here have had me running in circles for a while now.

@dfreeman dfreeman closed this Apr 7, 2020
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.

Building addon with 1.3.0-beta.1 fails with message Unable to resolve styles from addon ; is it installed?
2 participants