Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support index-modules in exports #229

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions files/__addonLocation__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@
"default": "./dist/index.js"
},
"./*": {
"types": "./declarations/*.d.ts",
"default": "./dist/*.js"
"types": ["./declarations/*.d.ts", "./declarations/*/index.d.ts"],
"default": ["./dist/*.js", "./dist/*/index.js"]
},<% } else { %>
".": "./dist/index.js",
"./*": "./dist/*.js",<% } %>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this syntax support the array form?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what exactly you mean here? Support for arrays in general is given as backed by the above links. You mean in this particular place, like L109?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, like, if we add /index stuff, it should be both for and without the TS exports

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right! Not sure why I didn't even think about it. I'll add it, should we agree to actually go forward with this!

Copy link
Collaborator

@NullVoxPopuli NullVoxPopuli Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, you have my vote!
(not that this is a democracy, since we need to convince everyone the technical merits of a thing lol)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But what about vite? My understanding is this will fail under vite. Unless we can convince vite maintainers to change course? (not too likely?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why's vite matter here?

The need to declare something about index for ember's conventions helps all packagers

Expand All @@ -112,7 +112,8 @@
"typesVersions": {
"*": {
"*": [
"declarations/*"
"declarations/*",
"declarations/*/index"
]
}
}<% } %>
Expand Down
Loading