Skip to content
Discussion options

You must be logged in to vote

The short answer is: it doesn't matter, unless you are only installing dependencies (with npm/yarn install --production). For consistency, I add all build/dev/test tools in devDependencies, and the rest of the stuff in dependencies.

The situation where you might face problems is when you are only installing the dependencies and not devDependencies. Keep in mind Next.js will run your code both in the client and the server, so if you have a server-rendered page, and the app does not have less listed in the dependencies list, then your server will crash when trying to render the page.

From my previous SPA development experience, css preprocessors are devDependency, only those that I import …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by athrunsun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants