// Fix the following problem with the build in next.js
> Build error occurred
{ /xxx/node_modules/pkg/index.scss:1
$color: #4c9ffe;
^
SyntaxError: Invalid or unexpected token
at Module._compile (internal/modules/cjs/loader.js:723:23)
yarn add with-ssr-entry
// next.config.js
const withSsrEntry = require('with-ssr-entry')
module.exports = withSsrEntry() // like withCss, withSass