-
Notifications
You must be signed in to change notification settings - Fork 119
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
PowerCalendar
incompatible with Embroider-optimized app
#269
Comments
Getting error when i run my addons with
|
Just for reference, I followed the following Simplelabs bolg post about making old addons work in your Embroider Optimized app using packageRules and here's my current configuration to make this addon work with Embroider static component mode: return require('@embroider/compat').compatBuild(app, Webpack, {
staticAddonTestSupportTrees: true,
staticAddonTrees: true,
staticHelpers: true,
staticModifiers: true,
staticComponents: true,
packageRules: [
{
package: 'ember-power-calendar',
components: {
'<PowerCalendar />': {
acceptsComponentArguments: ['this.navComponent', 'this.daysComponent'],
layout: {
addonPath: 'templates/components/power-calendar.hbs'
}
}
}
}
]
}); Additionally, when instantiating the <PowerCalendar
@navComponent={{component "my-nav-component"}}
@daysComponent={{component "my-days-component"}}
/> Instead of : <PowerCalendar
@navComponent="my-nav-component"
@daysComponent="my-days-component"
/> |
v0.19.0 is now ready for embroider |
👋 It appears things are stabilising around Embroider because in the next version of ember-cli all newly-created addons will have Embroider testing baked into ember-try by default. I've been experimenting with Embroider and various addons and it appears that ember-power-calendar is incompatible with an Embroider "optimized" app, i.e. an app with component tree-shaking enabled.
When I try to use an example in my app like:
I get the following error:
This points to the fact we should use the new
ensureSafeComponent
@embroider/util
helper (documented here) when passing around thepower-calendar/nav
andpower-calendar/days
components.ember-power-calendar/addon/components/power-calendar.js
Lines 17 to 18 in 2855dac
I tried to spike out adding Embroider ember-try testing in the following branch, but it appears this repo's usage of ember-cli-custom-assertions is causing a lot of failures as that is also incompatible with Embroider (issue here: DockYard/ember-cli-custom-assertions#46).
The text was updated successfully, but these errors were encountered: