Closed y-nk closed 3 years ago
Deleting the dist/ and running the command again fixed it. Not sure why but it's no longer a pb.
You've edited your comment, but yes, TSDX assumes you have an entrypoint at src/index
unless you've specified otherwise. In this case, you didn't specify a different entrypoint and didn't have anything at src/index
, hence the empty builds.
I didn't write this code, but aside from being poor style with many ternaries, your issue points out that it doesn't properly error check -- it should error out in the case where the entrypoint file doesn't exist. That would be better DX as feedback to the user. I'm somewhat surprised that Rollup itself doesn't error though at this case though.
oh wow thanks for the feedback @agilgur5 :)
Current Behavior
I've setup a project with the react+storybook template, but instead of having the Thing component, I've changed to have a sub folder structure instead (with components/ and sub folders components/Button/ ). The result is that, when calling
yarn build
, all types of build are empty files.Expected behavior
both cjs and esm builds should work event with subfolder structures.
Suggested solution(s)
maybe there's something to do with the entry point at compile time?
Additional context