Skip to content

Commit 0f93ce8

Browse files
authored
docs: move sandboxes to vite (#1111)
1 parent 7af46e4 commit 0f93ce8

Some content is hidden

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

68 files changed

+459
-102
lines changed

sandboxes/bar/grouped/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<script type="module" defer src="./index.tsx"></script>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
</body>
11+
</html>

sandboxes/bar/grouped/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { createRoot } from 'react-dom/client';
33

4-
import { App } from './App';
4+
import { App } from './App.js';
55

66
const rootElement = document.getElementById('root');
7-
createRoot(rootElement).render(<App />);
7+
createRoot(rootElement!).render(<App />);

sandboxes/bar/grouped/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
{
2-
"main": "index.tsx",
2+
"type": "module",
3+
"scripts": {
4+
"start": "vite"
5+
},
36
"dependencies": {
47
"chart.js": "^4.0.0",
58
"faker": "5.5.3",
69
"react": "18.2.0",
710
"react-chartjs-2": "^5.0.0",
8-
"react-dom": "18.2.0",
9-
"react-scripts": "5.0.1"
11+
"react-dom": "18.2.0"
1012
},
1113
"devDependencies": {
1214
"@types/faker": "5.5.9",
1315
"@types/react": "18.0.25",
1416
"@types/react-dom": "18.0.9",
15-
"typescript": "4.9.3"
17+
"@vitejs/plugin-react": "^2.2.0",
18+
"typescript": "4.9.3",
19+
"vite": "^3.2.4"
1620
}
1721
}

sandboxes/bar/grouped/vite.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from 'vite';
2+
import react from '@vitejs/plugin-react';
3+
4+
export default defineConfig({
5+
plugins: [react()],
6+
});

sandboxes/bar/horizontal/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<script type="module" defer src="./index.tsx"></script>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
</body>
11+
</html>

sandboxes/bar/horizontal/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { createRoot } from 'react-dom/client';
33

4-
import { App } from './App';
4+
import { App } from './App.js';
55

66
const rootElement = document.getElementById('root');
7-
createRoot(rootElement).render(<App />);
7+
createRoot(rootElement!).render(<App />);

sandboxes/bar/horizontal/package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
11
{
2-
"main": "index.tsx",
2+
"type": "module",
3+
"scripts": {
4+
"start": "vite"
5+
},
36
"dependencies": {
47
"chart.js": "^4.0.0",
58
"faker": "5.5.3",
69
"react": "18.2.0",
710
"react-chartjs-2": "^5.0.0",
8-
"react-dom": "18.2.0",
9-
"react-scripts": "5.0.1"
11+
"react-dom": "18.2.0"
1012
},
1113
"devDependencies": {
1214
"@types/faker": "5.5.9",
1315
"@types/react": "18.0.25",
1416
"@types/react-dom": "18.0.9",
15-
"typescript": "4.9.3"
17+
"@vitejs/plugin-react": "^2.2.0",
18+
"typescript": "4.9.3",
19+
"vite": "^3.2.4"
1620
}
1721
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { defineConfig } from 'vite';
2+
import react from '@vitejs/plugin-react';
3+
4+
export default defineConfig({
5+
plugins: [react()],
6+
});

sandboxes/bar/stacked/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<script type="module" defer src="./index.tsx"></script>
7+
</head>
8+
<body>
9+
<div id="root"></div>
10+
</body>
11+
</html>

sandboxes/bar/stacked/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22
import { createRoot } from 'react-dom/client';
33

4-
import { App } from './App';
4+
import { App } from './App.js';
55

66
const rootElement = document.getElementById('root');
7-
createRoot(rootElement).render(<App />);
7+
createRoot(rootElement!).render(<App />);

0 commit comments

Comments
 (0)