https://github.com/xiaoxiaojx/with-ssr-entry
next.js - solve the problem of syntaxError: Invalid or unexpected token
https://github.com/xiaoxiaojx/with-ssr-entry
Last synced: 5 months ago
JSON representation
next.js - solve the problem of syntaxError: Invalid or unexpected token
- Host: GitHub
- URL: https://github.com/xiaoxiaojx/with-ssr-entry
- Owner: xiaoxiaojx
- Created: 2020-06-05T23:31:56.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-09-07T16:12:45.000Z (about 3 years ago)
- Last Synced: 2025-03-26T10:03:00.667Z (7 months ago)
- Language: TypeScript
- Homepage:
- Size: 12.7 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## with-ssr-entry
> https://github.com/xiaoxiaojx/blog/issues/40```js
// 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
```bash
yarn add with-ssr-entry
```## example
```js
// next.config.jsconst withSsrEntry = require('with-ssr-entry')
module.exports = withSsrEntry() // like withCss, withSass```