S
S
Sergey Alpeev2018-08-27 18:15:49
React
Sergey Alpeev, 2018-08-27 18:15:49

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, 
              
        },
    
    
      },
    };

but I don’t know how to add a second loader, by analogy it doesn’t work, I’m very grateful for the help

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question