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

William/handle default #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

William/handle default #13

wants to merge 2 commits into from

Conversation

swansontec
Copy link
Owner

@swansontec swansontec commented Dec 16, 2019

This is a WIP solution to #12.

While this solution probably works in like 99% of cases, it uses a gross regular expression to determine whether or not a file has a default export. This will obviously fail if the file has the words export default inside a string, comment, or other non-code thing.

Instead, we should use a library like @babel/parse to properly analyze the source text to determine whether or not it has a default export.

@swansontec
Copy link
Owner Author

Rollup itself now produces a list of entry point names, so we can use that to finally implement this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant