ember-learn / guidemaker-ember-template

Guidemaker template for Ember Guides websites
https://guidemaker-ember-template.netlify.app/release
MIT License
5 stars 21 forks source link

Pulls in duplicate copy of showdown #156

Closed ef4 closed 1 year ago

ef4 commented 1 year ago

guidemaker-ember-template depends on ember-cli-showdown.

ember-cli-showdown provides showdown via an old-school app.import which puts it into vendor.js.

But guidemaker-ember-template

  1. imports from showdown
  2. has showdown in its dependencies
  3. has ember-auto-import in its dependencies

Those three things together are the conditions that tell ember-auto-import it's supposed to pull showdown into the app. This becomes an extra copy in addition to the one in vendor.js.

Sometimes this is only bad for bloat, but depending on the implementation-specific ordering of the two copies, it can also mean that the copy of showdown that gets extensions registered might not be the same copy that the components actually try to use.

I found this while investigating https://github.com/embroider-build/embroider/issues/1501.

mansona commented 1 year ago

I've fixed the underlying issue in ember-cli-showdown and released that recently: https://github.com/empress/ember-cli-showdown/releases/tag/v7.0.0

Now I still need to fix some of the other dependency issues with showdown extensions and #133 should be good to go 🙃