Skip to content

next.js - solve the problem of syntaxError: Invalid or unexpected token

Notifications You must be signed in to change notification settings

xiaoxiaojx/with-ssr-entry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

with-ssr-entry

xiaoxiaojx/blog#40

// 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)

install

yarn add with-ssr-entry

example

// next.config.js

const withSsrEntry = require('with-ssr-entry')
module.exports = withSsrEntry() // like withCss, withSass

About

next.js - solve the problem of syntaxError: Invalid or unexpected token

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published