Skip to content

Commit 2b69fdc

Browse files
committed
v3: Vite 5 & ESM [publish]
1 parent 9ba7932 commit 2b69fdc

20 files changed

+1189
-1577
lines changed
File renamed without changes.

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 3.0.0
4+
5+
- Add vite@5 to peer dependency ranges
6+
- Switch plugin to ESM. This removes the CJS warning when using the plugin with Vite 5. A CJS wrapper is still provided but [migrating](https://vitejs.dev/guide/migration.html#deprecate-cjs-node-api) to running Vite in ESM is encouraged
7+
- Drop support for Vite 2 & 3 & node<18 (aligns with Vite 5)
8+
39
## 2.0.0
410

511
Context menu on option+right click to see all the intermediate components and jump to the right place!

bun.lockb

-8.09 KB
Binary file not shown.

package.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "vite-plugin-react-click-to-component",
3-
"version": "2.0.0",
3+
"type": "module",
4+
"version": "3.0.0",
45
"license": "MIT",
56
"scripts": {
67
"postinstall": "cd playground && bun i",
@@ -9,24 +10,25 @@
910
"tsc": "tsc",
1011
"lint": "bun lint-ci --fix --cache",
1112
"lint-ci": "eslint src scripts --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
12-
"prettier": "yarn prettier-ci --write",
13+
"prettier": "bun prettier-ci --write",
1314
"prettier-ci": "prettier --ignore-path=.gitignore --check '**/*.{ts,tsx,html,css,json,md,yml}'",
14-
"ci": "tsc && bun lint-ci && bun prettier-ci && bun run build && cd playground && tsc && bun lint-ci"
15+
"ci": "tsc && bun lint-ci && bun prettier-ci && bun run build && cd playground && tsc && bun lint-ci && cd ../dist && bun publint"
1516
},
1617
"prettier": {
1718
"trailingComma": "all"
1819
},
1920
"peerDependencies": {
2021
"react": ">=16",
21-
"vite": "^2 || ^3 || ^4"
22+
"vite": "^4 || ^5"
2223
},
2324
"devDependencies": {
24-
"@arnaud-barre/eslint-config": "^1.0.19",
25-
"@nabla/tnode": "^0.8.0",
26-
"@types/node": "^18.14.0",
27-
"eslint": "^8.34.0",
28-
"prettier": "^2.8.4",
29-
"typescript": "^4.9.5",
30-
"vite": "^4.1.4"
25+
"@arnaud-barre/eslint-config": "^3.1.5",
26+
"@arnaud-barre/tnode": "^0.19.2",
27+
"@types/node": "^18.18.9",
28+
"eslint": "^8.54.0",
29+
"prettier": "3.0.3",
30+
"publint": "^0.2.5",
31+
"typescript": "~5.2.2",
32+
"vite": "^5.0.0"
3133
}
3234
}
File renamed without changes.

playground/bun.lockb

17.3 KB
Binary file not shown.

playground/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html>
1+
<!doctype html>
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />

playground/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "playground",
3+
"type": "module",
34
"private": true,
45
"scripts": {
56
"dev": "vite",
@@ -10,7 +11,7 @@
1011
"react-dom": "^18.2.0"
1112
},
1213
"devDependencies": {
13-
"@types/react-dom": "^18.0.11",
14-
"@vitejs/plugin-react-swc": "^3.2.0"
14+
"@types/react-dom": "^18.2.17",
15+
"@vitejs/plugin-react-swc": "^3.5.0"
1516
}
1617
}

playground/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import reactLogo from "./react.svg";
2-
import { Button } from "./Button";
2+
import { Button } from "./Button.tsx";
33
import "./App.css";
44

55
export const App = () => (

playground/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { StrictMode } from "react";
22
import { createRoot } from "react-dom/client";
3-
import { App } from "./App";
3+
import { App } from "./App.tsx";
44
import "./index.css";
55

66
createRoot(document.getElementById("root")!).render(

0 commit comments

Comments
 (0)