I'm using reselect and redux with nextjs, and would like to keep the reducers, actions, and selectors with the component file for organization reasons. Unfortunately it gives an "Build optimization failed: found pages without a React Component as default export in", is there any way to ignore a "redux" folder or similar?
Asked
Active
Viewed 1,522 times
1
-
Can you post the relevant files here? – itsanewabstract Jun 23 '20 at 23:34
-
1Every js file in pages directory [has to be a page](https://github.com/vercel/next.js/issues/8617#issuecomment-527779921). That means if you're js file is not a page then don't put it there. – HMR Jun 24 '20 at 07:36
1 Answers
1
If your redux folder, and any other redux files, are not in the pages directory it should be ignored.

Sam Roehrich
- 123
- 1
- 6