adopted-ember-addons / ember-sortable

Sortable UI primitives for Ember.js
https://ember-sortable.netlify.app/
MIT License
298 stars 148 forks source link

importing from the _app_ directory was disallowed because of the exports config. #521

Closed NullVoxPopuli closed 10 months ago

NullVoxPopuli commented 10 months ago

Looks like none of the _app_ files are importable.

this is an issue I thought we would have encountered sooner:

You tried to reverse exports for the file
   `./dist/_app_/modifiers/sortable-group.js` 
   in package `ember-sortable` but it does not match any 
   of the exports rules defined in package.json. 
   This means it should not be possible to access directly.

ember-sortable is a v2 addon already, but forgot to re-export their _app_ directory:

  "exports": {
    ".": "./dist/index.js",
    "./modifiers/*": "./dist/modifiers/*",
    "./services/*": "./dist/services/*",
    "./test-support": "./dist/test-support/index.js",
    "./addon-main.js": "./addon-main.js"
  },

:sweat_smile:

Discussion: https://discord.com/channels/480462759797063690/1182017862651629601/1182019040785473566

--------------_

Note, by default, this sort of change isn't needed, as the blueprint includes app already:

".": "./dist/index.js",
"./*": "./dist/*.js",
"./test-support": "./dist/test-support/index.js",
"./addon-main.js": "./addon-main.cjs"