Answer the question
In order to leave comments, you need to log in
How to use Nextjs configs in Sailsjs?
Good afternoon, I'm trying to deal with the Sailsjs + Nextjs stack,
for this I took a hook for Sailsjs https://github.com/RasCarlito/sails-hook-next . But I don’t understand how to transfer loaders for Nextjs to its config, following the example, I made such a config
const withSass = require('@zeit/next-sass')
const { webpack } = withSass()
module.exports.next = {
// Sails integration options
api: {
// Prefix for all Sails API routes
prefix: '/api'
},
// Next.js instance options. Passed to `next()`.
server: {
// Next.js root directory
dir: '.',
// Dev mode. Is overridden by `process.env.NODE_ENV !== 'production'`
dev: false,
// Hide error messages
quiet: false,
// Equivalent to a `next.config.js` file
conf: {
webpack,
},
},
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question