Fix package.json exports for index modules#646
Conversation
|
Hey 👋 thanks for the PR. I'm wondering if it makes sense to add vite mode to the test app. Do you know if is there a feasible way to add vite via ember-try? I'm mostly asking out of curiosity, your PR LGTM in its current state. |
That would be nice, but I don't think that is practically feasible. There are too many differences in the boilerplate, it is not just changing dependencies. You could have a separate The latest v2 addon blueprint has a different setup with no separate test-app anymore, but it will only run with Vite, and won't support classic or Emrboider/webpack. And by not having two separate packages (addon and test-app), it wouldn't be able to test the change here with package.json exports, as those wouldn't be used when tests are inside the same package. 😅 |
|
would it be possible to land this some time soon, we are also blocked on vite adoption 🙏🏻 |
|
@simonihmig I see. Thank you for the explanation! |
|
Just published it under v2.3.2 https://github.com/san650/ember-cli-page-object/releases/tag/v2.3.2 |
An import like
import { alias } from 'ember-cli-page-object/macros';was failing to build when using Vite. It turns out there are indeed exports entries missing for all imports that should resolve to an index.js module. The existing./*would not cover those correctly (there is no./dist/macros.js).I think this change here is correct, I wonder though why this didn't came up earlier, with ember-cli and ember-auto-import or Embroider, both using webpack which should also acknowledge package.json exports. 🤔