Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vitejs/vite-plugin-react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.0
Choose a base ref
...
head repository: vitejs/vite-plugin-react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.1
Choose a head ref
  • 11 commits
  • 9 files changed
  • 3 contributors

Commits on Sep 25, 2023

  1. fix(deps): update all non-major dependencies (#226)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Sep 25, 2023
    Copy the full SHA
    17ca1bc View commit details

Commits on Oct 2, 2023

  1. chore(deps): update all non-major dependencies (#229)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 2, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    IvanGoncharov Ivan Goncharov
    Copy the full SHA
    2c3330b View commit details

Commits on Oct 11, 2023

  1. chore(deps): update all non-major dependencies (#232)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 11, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    IvanGoncharov Ivan Goncharov
    Copy the full SHA
    83fd565 View commit details

Commits on Oct 16, 2023

  1. fix(deps): update all non-major dependencies (#236)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 16, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4e8e2e2 View commit details
  2. chore(deps): update dependency lint-staged to v15 (#237)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 16, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    IvanGoncharov Ivan Goncharov
    Copy the full SHA
    77b2cd8 View commit details

Commits on Oct 23, 2023

  1. fix(deps): update all non-major dependencies (#244)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 23, 2023
    Copy the full SHA
    4777304 View commit details
  2. chore(deps): update dependency eslint-plugin-regexp to v2 (#245)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c4f40f8 View commit details

Commits on Oct 30, 2023

  1. chore(deps): update all non-major dependencies (#247)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 30, 2023
    Copy the full SHA
    4420b96 View commit details
  2. chore(deps): update actions/setup-node action to v4 (#248)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 30, 2023
    Copy the full SHA
    05ef392 View commit details

Commits on Oct 31, 2023

  1. Copy the full SHA
    b783190 View commit details

Commits on Nov 2, 2023

  1. Copy the full SHA
    b255776 View commit details
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ jobs:
uses: pnpm/action-setup@v2.4.0

- name: Set node version to ${{ matrix.node_version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
cache: "pnpm"
@@ -104,7 +104,7 @@ jobs:
uses: pnpm/action-setup@v2.4.0

- name: Set node version to 18
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
uses: pnpm/action-setup@v2.4.0

- name: Set node version to 16.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16.x
registry-url: https://registry.npmjs.org/
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -31,29 +31,29 @@
"ci-publish": "tsx scripts/publishCI.ts"
},
"devDependencies": {
"@types/fs-extra": "^11.0.2",
"@types/node": "^18.17.17",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"@vitejs/release-scripts": "^1.3.0",
"eslint": "^8.49.0",
"eslint-define-config": "^1.23.0",
"eslint-plugin-import": "^2.28.1",
"@types/fs-extra": "^11.0.3",
"@types/node": "^18.18.7",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@vitejs/release-scripts": "^1.3.1",
"eslint": "^8.52.0",
"eslint-define-config": "^1.24.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-regexp": "^1.15.0",
"eslint-plugin-regexp": "^2.1.1",
"fs-extra": "^11.1.1",
"lint-staged": "^14.0.1",
"lint-staged": "^15.0.2",
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"playwright-chromium": "^1.38.0",
"playwright-chromium": "^1.39.0",
"prettier": "^3.0.3",
"rollup": "^3.29.2",
"rollup": "^3.29.4",
"simple-git-hooks": "^2.9.0",
"tsx": "^3.12.10",
"tsx": "^3.14.0",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vite": "^4.4.9",
"vitest": "^0.34.4"
"vite": "^4.5.0",
"vitest": "^0.34.6"
},
"simple-git-hooks": {
"pre-commit": "pnpm exec lint-staged --concurrent false"
4 changes: 4 additions & 0 deletions packages/plugin-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,10 @@

## Unreleased

## 4.1.1 (2023-11-02)

- Enable retainLines to get correct line numbers for jsxDev (fix [#235](https://github.com/vitejs/vite-plugin-react/issues/235))

## 4.1.0 (2023-09-24)

- Add `@types/babel__cores` to dependencies (fix [#211](https://github.com/vitejs/vite-plugin-react/issues/211))
6 changes: 3 additions & 3 deletions packages/plugin-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitejs/plugin-react",
"version": "4.1.0",
"version": "4.1.1",
"license": "MIT",
"author": "Evan You",
"contributors": [
@@ -38,10 +38,10 @@
},
"homepage": "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react#readme",
"dependencies": {
"@babel/core": "^7.22.20",
"@babel/core": "^7.23.2",
"@babel/plugin-transform-react-jsx-self": "^7.22.5",
"@babel/plugin-transform-react-jsx-source": "^7.22.5",
"@types/babel__core": "^7.20.2",
"@types/babel__core": "^7.20.3",
"react-refresh": "^0.14.0"
},
"peerDependencies": {
2 changes: 2 additions & 0 deletions packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
@@ -235,6 +235,8 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
root: projectRoot,
filename: id,
sourceFileName: filepath,
// Required for esbuild.jsxDev to provide correct line numbers
retainLines: !isProduction && isJSX && opts.jsxRuntime !== 'classic',
parserOpts: {
...babelOptions.parserOpts,
sourceType: 'module',
4 changes: 2 additions & 2 deletions playground/mdx/package.json
Original file line number Diff line number Diff line change
@@ -13,8 +13,8 @@
},
"devDependencies": {
"@mdx-js/rollup": "^2.3.0",
"@types/react": "^18.2.21",
"@types/react-dom": "^18.2.7",
"@types/react": "^18.2.33",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react": "workspace:*"
}
}
2 changes: 1 addition & 1 deletion playground/ssr-react/package.json
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.16.0"
"react-router-dom": "^6.17.0"
},
"devDependencies": {
"@vitejs/plugin-react": "workspace:*",
1,103 changes: 408 additions & 695 deletions pnpm-lock.yaml

Large diffs are not rendered by default.