Skip to content

Commit 581f556

Browse files
feat: fix things with candy
1 parent ae7a20d commit 581f556

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

examples/cra/package.json

+4-10
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "6.16.1",
44
"private": true,
55
"scripts": {
6-
"dev": "GENERATE_SOURCEMAP=false react-scripts start",
7-
"start": "GENERATE_SOURCEMAP=false react-scripts start",
8-
"build": "GENERATE_SOURCEMAP=false react-scripts build",
9-
"eject": "GENERATE_SOURCEMAP=false react-scripts eject"
6+
"dev": "DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false react-scripts start",
7+
"start": "DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false react-scripts start",
8+
"build": "DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false react-scripts build",
9+
"eject": "DISABLE_ESLINT_PLUGIN=true GENERATE_SOURCEMAP=false react-scripts eject"
1010
},
1111
"dependencies": {
1212
"@types/node": "^22.8.4",
@@ -18,12 +18,6 @@
1818
"react-notion-x": "workspace:*",
1919
"react-scripts": "5.0.1"
2020
},
21-
"eslintConfig": {
22-
"extends": [
23-
"react-app",
24-
"react-app/jest"
25-
]
26-
},
2721
"browserslist": {
2822
"production": [
2923
">0.2%",

examples/cra/src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ExtendedRecordMap } from 'notion-types'
1+
import { type ExtendedRecordMap } from 'notion-types'
22
import { NotionRenderer } from 'react-notion-x'
33
import { Code } from 'react-notion-x/build/third-party/code'
44
import { Collection } from 'react-notion-x/build/third-party/collection'

examples/cra/src/index.tsx

+6-11
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
1-
import * as React from 'react'
2-
3-
import * as ReactDOM from 'react-dom'
41
// core styles shared by all of react-notion-x (required)
52
import 'react-notion-x/src/styles.css'
6-
7-
import App from './App'
83
// used for code syntax highlighting (optional)
94
// import 'prismjs/themes/prism-tomorrow.css'
105
// used for rendering equations (optional)
116
// import 'katex/dist/katex.min.css'
127
import './index.css'
138

14-
ReactDOM.render(
15-
<React.StrictMode>
16-
<App />
17-
</React.StrictMode>,
18-
document.getElementById('root')
19-
)
9+
import { createRoot } from 'react-dom/client'
10+
11+
import App from './App'
12+
13+
const root = createRoot(document.getElementById('root')!)
14+
root.render(<App />)

packages/react-notion-x/package.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,24 @@
1616
"import": "./build/index.js"
1717
},
1818
"./build/third-party/code": {
19-
"types": "./build//third-party/code.d.ts",
20-
"import": "./build//third-party/code.js"
19+
"types": "./build/third-party/code.d.ts",
20+
"import": "./build/third-party/code.js"
2121
},
2222
"./build/third-party/collection": {
23-
"types": "./build//third-party/collection.d.ts",
24-
"import": "./build//third-party/collection.js"
23+
"types": "./build/third-party/collection.d.ts",
24+
"import": "./build/third-party/collection.js"
2525
},
2626
"./build/third-party/equation": {
27-
"types": "./build//third-party/equation.d.ts",
28-
"import": "./build//third-party/equation.js"
27+
"types": "./build/third-party/equation.d.ts",
28+
"import": "./build/third-party/equation.js"
2929
},
3030
"./build/third-party/modal": {
31-
"types": "./build//third-party/modal.d.ts",
32-
"import": "./build//third-party/modal.js"
31+
"types": "./build/third-party/modal.d.ts",
32+
"import": "./build/third-party/modal.js"
3333
},
3434
"./build/third-party/pdf": {
35-
"types": "./build//third-party/pdf.d.ts",
36-
"import": "./build//third-party/pdf.js"
35+
"types": "./build/third-party/pdf.d.ts",
36+
"import": "./build/third-party/pdf.js"
3737
},
3838
"./styles.css": "./src/styles.css",
3939
"./src/styles.css": "./src/styles.css"

0 commit comments

Comments
 (0)