Skip to content

Commit 5ed9b7e

Browse files
committed
Fixed for NextJS
1 parent 4a0ca86 commit 5ed9b7e

10 files changed

+5578
-940
lines changed

.eslintrc.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"root": "./src",
3+
"overrides": [
4+
{
5+
"files": ["src/**/*.ts", "src/**/*.tsx"],
6+
"parserOptions": {
7+
"project": "./tsconfig.json"
8+
}
9+
}
10+
],
11+
"env": {
12+
"browser": true,
13+
"es2021": true
14+
},
15+
"extends": [
16+
"standard-with-typescript",
17+
"plugin:react/recommended"
18+
],
19+
"parserOptions": {
20+
"ecmaVersion": "latest"
21+
},
22+
"plugins": [
23+
"react"
24+
],
25+
"rules": {
26+
}
27+
}

.prettierrc

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,16 @@ app.use('/images/*', ImagesRequestHandler());
1717

1818
app.listen();
1919
```
20+
2021
## Example JSX
2122
```jsx
2223
<OptimizedImage src="https://picsum.photos/200/300" width={200} height={300} />
24+
```
25+
26+
## For NextJS
27+
To work with NextJS you need to add the following to your `next.config.js`:
28+
```javascript
29+
experimental: {
30+
serverComponentsExternalPackages: ["sharp"],
31+
}
2332
```

0 commit comments

Comments
 (0)