Conversation
index.js
Outdated
| } = createColors() | ||
| } = colors | ||
|
|
||
| export default colors |
There was a problem hiding this comment.
Doesn't that break on systems that do not support ESM imports?
There was a problem hiding this comment.
@kibertoad not sure, still need to testing. But I think rollup will handle that?
There was a problem hiding this comment.
I remember default exports being a problem even with rollup, that was mentioned e. g. in Webpack project
|
What you say about the types is true, but it was probably a mistake since I didn't intend to support default exports. Named exports, default exports, or both? Which one is more idiomatic in Node? Should we even have a default export? |
|
@jorgebucaran Well, if you don't intend to support default exports, you should fix types avoid a mistake for users. Also |
|
Of course. Can you show us how to fix them? As I said, this was likely a mistake, because I didn't intend to support default exports when I wrote the types. Now, I'm open to discussing adding them in the future. |

Problems
For example if I do this, will get an error:
And then need to change to:
So I'm not sure if there was a special reason for this design? otherwise the general import usage case would be more reasonable and matched the type system.😅