Skip to content

Commit b6db3ac

Browse files
committed
Replace react-notion-x with fork from @onnimonni
1 parent 6e36086 commit b6db3ac

File tree

7 files changed

+3842
-6651
lines changed

7 files changed

+3842
-6651
lines changed

.mise.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[tools]
2+
# There was a moment when Notion search API was broken
3+
# It was fixed directly in react-notion-x dependency
4+
# When trying to replace the dependency I tried to run
5+
# $ brew install vips
6+
# $ yarn add https://github.com/NotionX/react-notion-x#v6.16.2
7+
# There's weird errors if one is building react-notion-x directly from github
8+
# 'ValueError: invalid mode: 'rU' while trying to load binding.gyp'
9+
# These should be fixed by downgrading python to 3.10
10+
# Source: https://stackoverflow.com/a/74732671
11+
python = ['3.10']
12+
13+
# The node-gyp module doesn't work properly when using node 20
14+
# TypeError: Cannot assign to read only property 'cflags' of object '#<Object>'
15+
# See more: https://stackoverflow.com/a/77910474/1337062
16+
node = ['20']
17+
"npm:yarn" = "latest"
18+
19+
# To be able to build the notion-react-x directly from Github master
20+
"npm:lerna" = "^4.0.0"

next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/// <reference types="next/image-types/global" />
33

44
// NOTE: This file should not be edited
5-
// see https://nextjs.org/docs/basic-features/typescript for more information.
5+
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.

next.config.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,17 @@ module.exports = withBundleAnalyzer({
1818
formats: ['image/avif', 'image/webp'],
1919
dangerouslyAllowSVG: true,
2020
contentSecurityPolicy: "default-src 'self'; script-src 'none'; sandbox;"
21-
}
21+
},
22+
webpack: (config) => {
23+
config.resolve.alias = {
24+
...config.resolve.alias,
25+
'notion-utils': '@onnimonni/notion-utils',
26+
'notion-types': '@onnimonni/notion-types',
27+
'notion-client': '@onnimonni/notion-client',
28+
'notion-compat': '@onnimonni/notion-compat',
29+
'react-notion-x': '@onnimonni/react-notion-x'
30+
};
31+
32+
return config;
33+
},
2234
})

0 commit comments

Comments
 (0)