Closed patocallaghan closed 3 years ago
ember-composable-helpers use the same only
/ except
system and doesn't break with Embroider.
I think this is because of those changes:
https://github.com/DockYard/ember-composable-helpers/pull/316
I'll try to replicate this here
I'm not sure if there's much to do here besides some documentation around Embroider but thought I'd raise it anyway.
Problem
It appears things are stabilising around Embroider because since ember-cli 3.25.0 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-cli-string-helpers
is incompatible with an Embroider app when you use theonly
orexcept
configuration.If you try and run a build using the following configuration it fails with the
I have a reproduction in this repo here. You can see the configuration used in https://github.com/patocallaghan/string-helpers-embroider/commit/39003b207455995d48f3d65a31239e0c77b4f33a
Embroider support
It's worth calling out that the use case for using the
only
andexcept
configuration will no longer be required by Embroider "Optimized" mode, i.e. tree-shaking enabled, as that will only load the helpers in your build that you specifically use.I guess the problem with this addon is if folks are using Embroider "Safe" mode which aims to offer full backwards compatibility with the existing Ember CLI pipeline.
Fix?
I'm not sure if it's worth fixing this as personally I'm just going to remove the
only
andexcept
config while we are experimenting with Embroider "Safe" mode. Maybe all that is required is some documentation on Embroider compatibility in the README. With Embroider "Optimized" mode the use case foronly
andexcept
is no longer needed.