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

restrict files copied into .next/dist/pages #988

Closed
khrome83 opened this issue Feb 4, 2017 · 5 comments
Closed

restrict files copied into .next/dist/pages #988

khrome83 opened this issue Feb 4, 2017 · 5 comments

Comments

@khrome83
Copy link
Contributor

khrome83 commented Feb 4, 2017

I was playing around with the idea of placing a__tests__ folder into my different directory areas.

So

root
  |-pages
  |     `__tests__
  |             `index.test.js
  |     `index.js
  |-components
  |     `__tests__
  |     `Button.js
  |-layouts
        `__tests__
        `TwoColumn.js

But when I do this, I get duplicate issues because of files being copied into .next

.next/dist/pages/__tests__/index.test.js

What is the best way to solve this? I know I can omit the files from jest, but I don't think they should be copied over in general.

@arunoda
Copy link
Contributor

arunoda commented Feb 4, 2017

I think best idea is to ignore .next directory from Jest.

@arunoda arunoda closed this as completed Feb 4, 2017
@khrome83
Copy link
Contributor Author

khrome83 commented Feb 4, 2017 via email

@arunoda
Copy link
Contributor

arunoda commented Feb 4, 2017

@khrome83 currently it's possible to avoid sending those files.
They won't get added to webpack bundle or to the client code.

So, we don't need to worry about this issue.

@nkzawa
Copy link
Contributor

nkzawa commented Feb 5, 2017

Basically, you can't put any js files inside pages except components. I don't know if you can avoid this with webpack settings.

@khrome83
Copy link
Contributor Author

khrome83 commented Feb 5, 2017

That is kind of where I was going with this, if there was some configuration that should be opened up, or if by default __tests__, *.tests.js, *Spec.js, etc should not be copied.

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants