An open API service indexing awesome lists of open source software.

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

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.js

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

```