Skip to content

Commit 6f778ea

Browse files
authored
Upgrade vite (#35)
* upgrade vite and packages * force bootstrap * update build * fix build * fix build * fix backward * fix lint * upgrade pw * remove google fonts * add comment * fix font screenshots * fix cache key * fix snaps
1 parent 4040cda commit 6f778ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+24250
-25193
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,15 @@ jobs:
3333
${{ runner.os }}-build-
3434
${{ runner.os }}-
3535
36+
- name: cache playwright
37+
id: playwright-cache
38+
uses: actions/cache@v2
39+
with:
40+
path: ~/.cache/ms-playwright
41+
key: pw-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
42+
3643
- name: Install Dependencies
37-
run: npm run install-lerna
44+
run: npm install
3845

3946
- name: Bootstrap packages
4047
run: npm run bootstrap

.vscode/extensions.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
{
22
// See http://go.microsoft.com/fwlink/?LinkId=827846
33
// for the documentation about the extensions.json format
4-
"recommendations": [
5-
"esbenp.prettier-vscode",
6-
"dbaeumer.vscode-eslint",
7-
"orta.vscode-jest"
8-
]
4+
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
95
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ We use [Lerna](https://lerna.js.org/) to manage the monorepo with separate packa
1818
To run the project, open the command line in the project's root directory and enter the following commands:
1919

2020
# Install all required npm modules for lerna, and bootstrap lerna packages
21-
npm run install-lerna
21+
npm install
2222
npm run bootstrap
2323

2424
# Start the editor project

examples/editor/package-lock.json

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

examples/editor/package.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
"@types/react-dom": "^17.0.12",
1919
"@vitejs/plugin-react": "^1.0.7",
2020
"typescript": "^4.5.4",
21-
"vite": "^2.8.0",
21+
"vite": "^3.0.5",
2222
"eslint-config-react-app": "^7.0.0",
2323
"eslint": "^8.10.0",
24-
"vite-plugin-eslint": "^1.3.0"
24+
"vite-plugin-eslint": "^1.7.0"
2525
},
2626
"eslintConfig": {
2727
"extends": [
@@ -31,13 +31,5 @@
3131
"rules": {
3232
"curly": 1
3333
}
34-
},
35-
"workspaces": {
36-
"nohoist": [
37-
"**"
38-
],
39-
"packages": [
40-
"."
41-
]
4234
}
4335
}

examples/editor/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// import logo from './logo.svg'
2-
import styles from "./App.module.css";
32
import { EditorContent, useEditor } from "@blocknote/core";
3+
import "@blocknote/core/style.css";
44
import { Editor } from "@tiptap/core";
5-
// import "@blocknote/core/style.css";
5+
import styles from "./App.module.css";
66

77
type WindowWithProseMirror = Window &
88
typeof globalThis & { ProseMirror: Editor };

examples/editor/src/main.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import React from "react";
22
import ReactDOM from "react-dom";
3-
import "./index.css";
43
import App from "./App";
4+
import "./index.css";
5+
6+
window.React = React;
7+
window.ReactDOM = ReactDOM;
58

69
ReactDOM.render(
710
<React.StrictMode>

examples/editor/tsconfig.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"useDefineForClassFields": true,
55
"lib": ["DOM", "DOM.Iterable", "ESNext"],
66
"allowJs": false,
7-
"skipLibCheck": false,
7+
"skipLibCheck": true,
88
"esModuleInterop": false,
99
"allowSyntheticDefaultImports": true,
1010
"strict": true,
@@ -14,10 +14,10 @@
1414
"resolveJsonModule": true,
1515
"isolatedModules": true,
1616
"noEmit": true,
17-
"jsx": "react-jsx",
18-
"paths": {
19-
"@blocknote/core": ["../../packages/core/src"]
20-
}
17+
"jsx": "react-jsx"
18+
// "paths": {
19+
// "@blocknote/core": ["../../packages/core/src"]
20+
// }
2121
},
2222
"include": ["src"],
2323
"references": [

examples/editor/vite.config.ts

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
1-
import { defineConfig } from "vite";
21
import react from "@vitejs/plugin-react";
32
import * as path from "path";
4-
import eslintPlugin from "vite-plugin-eslint";
5-
3+
import { defineConfig } from "vite";
4+
// import eslintPlugin from "vite-plugin-eslint";
65
// https://vitejs.dev/config/
7-
export default defineConfig({
8-
plugins: [react(), eslintPlugin()],
6+
export default defineConfig((conf) => ({
7+
plugins: [react()],
98
optimizeDeps: {
109
// link: ['vite-react-ts-components'],
1110
},
1211
resolve: {
13-
alias: {
14-
// '@blocknote/core': '/@linked/vite-react-ts-components/index.ts',
15-
"@blocknote/core": path.resolve(
16-
require.resolve("../../packages/core/src/index.ts")
17-
),
18-
},
12+
alias:
13+
conf.command === "build"
14+
? {}
15+
: {
16+
// Comment out the line below to load a built version of blocknote
17+
// or, keep as is to load live from sources with live reload working
18+
"@blocknote/core": path.resolve(
19+
__dirname,
20+
"../../packages/core/src/"
21+
),
22+
},
1923
},
20-
});
24+
}));

lerna.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
{
2-
"packages": ["packages/*", "examples/*"],
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"useNx": false,
4+
"useWorkspaces": true,
35
"version": "0.0.0"
46
}

0 commit comments

Comments
 (0)