-
Notifications
You must be signed in to change notification settings - Fork 29k
Closed
Description
Bug report
Describe the bug
After upgrading from v8.9 to v9, Next will refuse to build my project because of the presence of non-react components. There doesn't seem to be a setting I can add in next's config to get around this, forcing me to completely destructure my pages. Isn't there a way to disabled automatic static optimization?
Spectrum question here.
Error:
> Build error occurred
Error: automatic static optimization failed: found pages without a React Component as default export in
proceeded by the list of all the files that aren't react components (AKA the style and test files).
To Reproduce
I have setup a file structure as such:
/pages
└── /MyPage
└── index.js // Standard React exported page
└── styles.js // EmotionJS styling for this specific page
└── MyPage.test.js // Jest test file
Simply run next build
or yarn build
Expected behavior
To build normally, like in Next v8.
Metadata
Metadata
Assignees
Labels
No labels