#Does embroider webpack not gracefully handle different versions?

1 messages · Page 1 of 1 (latest)

solid tree
#

I noticed converting an old app to embroider that if I have different versions of addons just end up breaking in webpack, and I was wondering if this is expected? Whereas Ember would merge both into tree and the last one it of a file sees "wins".

I assume it is (much like how ember-auto-import complains when there's two differing versions), but just want to make sure I'm not missing anything (like somehow have it gracefully have multiple versions).

Example ember-fetch I get the unclear message:

Module not found: Error: Can't resolve './ajax' in '$TMPDIR/embroider/cd3b7d/copies/my-app/node_modules/ember-fetch'

I know this is from the fact that in newer ember-fetch this file doesn't exist.

Had samething with ember-cli-uuid:

Can't resolve './mixins/adapters/uuid' in '$TMPDIR/embroider/cd3b7d/copies/my-app/node_modules/ember-cli-uuid'

Which I fixed by making sure there was only one version of that package

jagged laurel
#

I'm not sure about webpack's behavior, but I do know you can accidentally ship multiple copies dependencies if they are in different chunks

solid tree
#

Like webpack module federation? I thought that didn't work with Ember afaik

jagged laurel
#

that's a different thing, every webpack app has chunks

#

it's part of the "optimization" settings

#

module federation will hopefully work by the time ember is vite compatible