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

TypeScript, Default exports not working #941

Closed
jleck opened this issue Jul 4, 2019 · 4 comments
Closed

TypeScript, Default exports not working #941

jleck opened this issue Jul 4, 2019 · 4 comments
Labels

Comments

@jleck
Copy link

jleck commented Jul 4, 2019

Question

I'm quite sure why (could it be something to do synthetic exports?), but anytime I import typescript files with a default export, I get "...does not contain a default export". My files generally end with:

export default Index;

Or something similar. Works fine through create react app, so I'm not really sure what's causing it.

@therealparmesh
Copy link

+1

I'm noticing the same exact issue.

@lbucio
Copy link

lbucio commented Jul 8, 2019

I had the same issue, looks like it should be resolved now! 🎉 gatsbyjs/gatsby#15423

@gogoyqj
Copy link
Contributor

gogoyqj commented Aug 5, 2019

well...just add code below to docz.js and it works

filterComponents: files => files.filter(p => p.match(/ts[x]?$/))

i just do know why in 'docz-core/dist/index.js' line 1854

const files = await glob(pattern, {
    cwd: root
  });
  const filtered = filterComponents ? filterComponents(files) : files;
  const metadata = await docgen(filtered, config);

default filterComponents is

files => files.filter(filepath => /\/[A-Z]\w*\.(js|jsx|ts|tsx)$/.test(filepath))

...

@stale
Copy link

stale bot commented Oct 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants