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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v3.0.8
Choose a base ref
...
head repository: vitejs/vite
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.9
Choose a head ref
  • 17 commits
  • 64 files changed
  • 14 contributors

Commits on Aug 16, 2022

  1. Verified

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

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9aa9515 View commit details
  3. fix: skip undefined proxy entry (#9622)

    Co-authored-by: sapphi-red <green@sapphi.red>
    lbiceman and sapphi-red authored Aug 16, 2022

    Verified

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

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

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

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

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

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

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3bffd14 View commit details
  10. chore(deps): update dependency es-module-lexer to v1 (#9576)

    Co-authored-by: sapphi-red <green@sapphi.red>
    renovate[bot] and sapphi-red authored Aug 16, 2022

    Verified

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

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

Commits on Aug 17, 2022

  1. docs: fix typos in comments and documentation (#9711)

    Co-authored-by: Shinigami <chrissi92@hotmail.de>
    hiro0218 and Shinigami92 authored Aug 17, 2022

    Verified

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

Commits on Aug 18, 2022

  1. Copy the full SHA
    d04784b View commit details
  2. Verified

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

Commits on Aug 19, 2022

  1. Verified

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

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e0ecb80 View commit details
  3. release: v3.0.9

    patak-dev committed Aug 19, 2022
    Copy the full SHA
    518bc6c View commit details
Showing with 997 additions and 479 deletions.
  1. +2 −0 .github/workflows/ci.yml
  2. +2 −0 docs/guide/ssr.md
  3. +1 −1 docs/guide/troubleshooting.md
  4. +10 −10 package.json
  5. +2 −2 packages/create-vite/template-lit-ts/package.json
  6. +2 −2 packages/create-vite/template-lit/package.json
  7. +2 −2 packages/create-vite/template-preact-ts/package.json
  8. +2 −2 packages/create-vite/template-preact/package.json
  9. +1 −1 packages/create-vite/template-react-ts/package.json
  10. +1 −1 packages/create-vite/template-react/package.json
  11. +1 −1 packages/create-vite/template-svelte-ts/package.json
  12. +1 −1 packages/create-vite/template-svelte/package.json
  13. +1 −1 packages/create-vite/template-vanilla-ts/package.json
  14. +1 −1 packages/create-vite/template-vanilla/package.json
  15. +2 −2 packages/create-vite/template-vue-ts/package.json
  16. +1 −1 packages/create-vite/template-vue/package.json
  17. +1 −1 packages/plugin-legacy/package.json
  18. +3 −8 packages/plugin-vue-jsx/src/index.ts
  19. +1 −1 packages/plugin-vue/package.json
  20. +2 −2 packages/plugin-vue/src/index.ts
  21. +33 −16 packages/vite/CHANGELOG.md
  22. +4 −4 packages/vite/package.json
  23. +6 −1 packages/vite/src/client/client.ts
  24. +4 −0 packages/vite/src/node/__tests__/plugins/dynamicImportVar/__snapshots__/parse.test.ts.snap
  25. +16 −2 packages/vite/src/node/__tests__/plugins/dynamicImportVar/parse.test.ts
  26. +3 −0 packages/vite/src/node/build.ts
  27. +3 −2 packages/vite/src/node/optimizer/index.ts
  28. +79 −61 packages/vite/src/node/plugins/asset.ts
  29. +23 −0 packages/vite/src/node/plugins/completeSystemWrap.ts
  30. +17 −9 packages/vite/src/node/plugins/css.ts
  31. +20 −3 packages/vite/src/node/plugins/dynamicImportVars.ts
  32. +44 −38 packages/vite/src/node/plugins/importAnalysis.ts
  33. +5 −8 packages/vite/src/node/plugins/importAnalysisBuild.ts
  34. +8 −7 packages/vite/src/node/plugins/reporter.ts
  35. +1 −3 packages/vite/src/node/server/index.ts
  36. +3 −0 packages/vite/src/node/server/middlewares/proxy.ts
  37. +7 −3 packages/vite/src/node/server/transformRequest.ts
  38. +1 −1 packages/vite/src/node/server/ws.ts
  39. +1 −1 packages/vite/types/http-proxy.d.ts
  40. +15 −5 packages/vite/types/importGlob.d.ts
  41. +1 −1 playground/backend-integration/package.json
  42. +2 −2 playground/css-sourcemap/package.json
  43. +2 −2 playground/css/package.json
  44. +16 −0 playground/dynamic-import/__tests__/dynamic-import.spec.ts
  45. +4 −0 playground/dynamic-import/index.html
  46. +9 −0 playground/dynamic-import/nested/index.js
  47. +1 −0 playground/dynamic-import/nested/nested/self.js
  48. +1 −0 playground/dynamic-import/nested/self.js
  49. +6 −0 playground/glob-import/__tests__/glob-import.spec.ts
  50. +1 −0 playground/glob-import/dir/quote'.js
  51. +1 −1 playground/multiple-entrypoints/package.json
  52. +9 −2 playground/vitestSetup.ts
  53. +32 −0 playground/vue-legacy/Main.vue
  54. +10 −0 playground/vue-legacy/__tests__/vue-legacy.spec.ts
  55. BIN playground/vue-legacy/assets/asset.png
  56. +1 −0 playground/vue-legacy/env.d.ts
  57. +7 −0 playground/vue-legacy/index.html
  58. +3 −0 playground/vue-legacy/inline.css
  59. +13 −0 playground/vue-legacy/module.vue
  60. +18 −0 playground/vue-legacy/package.json
  61. +35 −0 playground/vue-legacy/vite.config.ts
  62. +1 −1 playground/vue-sourcemap/package.json
  63. +2 −2 playground/vue/package.json
  64. +490 −264 pnpm-lock.yaml
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ env:
NODE_OPTIONS: --max-old-space-size=6144
# install playwright binary manually (because pnpm only runs install script once)
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
# Vitest auto retry on flaky segfault
VITEST_SEGFAULT_RETRY: 3

on:
push:
2 changes: 2 additions & 0 deletions docs/guide/ssr.md
Original file line number Diff line number Diff line change
@@ -213,6 +213,8 @@ Dependencies are "externalized" from Vite's SSR transform module system by defau
If a dependency needs to be transformed by Vite's pipeline, for example, because Vite features are used untranspiled in them, they can be added to [`ssr.noExternal`](../config/ssr-options.md#ssr-noexternal).
For linked dependencies, they are not externalized by default to take advantage of Vite's HMR. If this isn't desired, for example, to test dependencies as if they aren't linked, you can add it to [`ssr.external`](../config/ssr-options.md#ssr-external).
:::warning Working with Aliases
If you have configured aliases that redirects one package to another, you may want to alias the actual `node_modules` packages instead to make it work for SSR externalized dependencies. Both [Yarn](https://classic.yarnpkg.com/en/docs/cli/add/#toc-yarn-add-alias) and [pnpm](https://pnpm.js.org/en/aliases) support aliasing via the `npm:` prefix.
:::
2 changes: 1 addition & 1 deletion docs/guide/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -88,4 +88,4 @@ For example, you might see these errors.
> TypeError: Cannot create property 'foo' on boolean 'false'
If these code are used inside dependecies, you could use [`patch-package`](https://github.com/ds300/patch-package) (or [`yarn patch`](https://yarnpkg.com/cli/patch) or [`pnpm patch`](https://pnpm.io/cli/patch)) for an escape hatch.
If these code are used inside dependencies, you could use [`patch-package`](https://github.com/ds300/patch-package) (or [`yarn patch`](https://yarnpkg.com/cli/patch) or [`pnpm patch`](https://pnpm.io/cli/patch)) for an escape hatch.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
},
"devDependencies": {
"@babel/types": "^7.18.10",
"@microsoft/api-extractor": "^7.29.0",
"@microsoft/api-extractor": "^7.29.2",
"@rollup/plugin-typescript": "^8.3.4",
"@types/babel__core": "^7.1.19",
"@types/babel__standalone": "^7.1.4",
@@ -54,15 +54,15 @@
"@types/prompts": "^2.4.0",
"@types/resolve": "^1.20.2",
"@types/sass": "~1.43.1",
"@types/semver": "^7.3.10",
"@types/semver": "^7.3.12",
"@types/stylus": "^0.48.38",
"@types/ws": "^8.5.3",
"@typescript-eslint/eslint-plugin": "^5.33.0",
"@typescript-eslint/parser": "^5.33.0",
"@typescript-eslint/eslint-plugin": "^5.33.1",
"@typescript-eslint/parser": "^5.33.1",
"conventional-changelog-cli": "^2.2.2",
"cross-env": "^7.0.3",
"esbuild": "^0.14.47",
"eslint": "^8.21.0",
"eslint": "^8.22.0",
"eslint-define-config": "^1.6.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
@@ -72,7 +72,7 @@
"minimist": "^1.2.6",
"npm-run-all": "^4.1.5",
"picocolors": "^1.0.0",
"playwright-chromium": "^1.24.2",
"playwright-chromium": "^1.25.0",
"pnpm": "^7.9.0",
"prettier": "2.7.1",
"prompts": "^2.4.2",
@@ -81,12 +81,12 @@
"semver": "^7.3.7",
"simple-git-hooks": "^2.8.0",
"tslib": "^2.4.0",
"tsx": "^3.8.1",
"tsx": "^3.8.2",
"typescript": "^4.6.4",
"unbuild": "^0.7.6",
"unbuild": "^0.8.8",
"vite": "workspace:*",
"vitepress": "^1.0.0-alpha.4",
"vitest": "^0.21.0",
"vitepress": "^1.0.0-alpha.5",
"vitest": "^0.22.0",
"vue": "^3.2.37"
},
"simple-git-hooks": {
4 changes: 2 additions & 2 deletions packages/create-vite/template-lit-ts/package.json
Original file line number Diff line number Diff line change
@@ -17,10 +17,10 @@
"build": "tsc && vite build"
},
"dependencies": {
"lit": "^2.2.8"
"lit": "^2.3.0"
},
"devDependencies": {
"typescript": "^4.6.4",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-lit/package.json
Original file line number Diff line number Diff line change
@@ -15,9 +15,9 @@
"build": "vite build"
},
"dependencies": {
"lit": "^2.2.8"
"lit": "^2.3.0"
},
"devDependencies": {
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-preact-ts/package.json
Original file line number Diff line number Diff line change
@@ -9,11 +9,11 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.10.1"
"preact": "^10.10.3"
},
"devDependencies": {
"@preact/preset-vite": "^2.3.0",
"typescript": "^4.6.4",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-preact/package.json
Original file line number Diff line number Diff line change
@@ -9,10 +9,10 @@
"preview": "vite preview"
},
"dependencies": {
"preact": "^10.10.1"
"preact": "^10.10.3"
},
"devDependencies": {
"@preact/preset-vite": "^2.3.0",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-react-ts/package.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.1",
"typescript": "^4.6.4",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-react/package.json
Original file line number Diff line number Diff line change
@@ -16,6 +16,6 @@
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@vitejs/plugin-react": "^2.0.1",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-svelte-ts/package.json
Original file line number Diff line number Diff line change
@@ -17,6 +17,6 @@
"svelte-preprocess": "^4.10.7",
"tslib": "^2.4.0",
"typescript": "^4.6.4",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-svelte/package.json
Original file line number Diff line number Diff line change
@@ -11,6 +11,6 @@
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^1.0.1",
"svelte": "^3.49.0",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla-ts/package.json
Original file line number Diff line number Diff line change
@@ -10,6 +10,6 @@
},
"devDependencies": {
"typescript": "^4.6.4",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vanilla/package.json
Original file line number Diff line number Diff line change
@@ -9,6 +9,6 @@
"preview": "vite preview"
},
"devDependencies": {
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
4 changes: 2 additions & 2 deletions packages/create-vite/template-vue-ts/package.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.3",
"typescript": "^4.6.4",
"vite": "^3.0.7",
"vue-tsc": "^0.39.5"
"vite": "^3.0.8",
"vue-tsc": "^0.40.1"
}
}
2 changes: 1 addition & 1 deletion packages/create-vite/template-vue/package.json
Original file line number Diff line number Diff line change
@@ -13,6 +13,6 @@
},
"devDependencies": {
"@vitejs/plugin-vue": "^3.0.3",
"vite": "^3.0.7"
"vite": "^3.0.8"
}
}
2 changes: 1 addition & 1 deletion packages/plugin-legacy/package.json
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@
"core-js": "^3.24.1",
"magic-string": "^0.26.2",
"regenerator-runtime": "^0.13.9",
"systemjs": "^6.12.1"
"systemjs": "^6.12.2"
},
"peerDependencies": {
"terser": "^5.4.0",
11 changes: 3 additions & 8 deletions packages/plugin-vue-jsx/src/index.ts
Original file line number Diff line number Diff line change
@@ -38,6 +38,9 @@ function vueJsxPlugin(options: Options = {}): Plugin {
let needHmr = false
let needSourceMap = true

const { include, exclude, babelPlugins = [], ...babelPluginOptions } = options
const filter = createFilter(include || /\.[jt]sx$/, exclude)

return {
name: 'vite:vue-jsx',

@@ -75,14 +78,6 @@ function vueJsxPlugin(options: Options = {}): Plugin {

async transform(code, id, opt) {
const ssr = opt?.ssr === true
const {
include,
exclude,
babelPlugins = [],
...babelPluginOptions
} = options

const filter = createFilter(include || /\.[jt]sx$/, exclude)
const [filepath] = id.split('?')

// use id for script blocks in Vue SFCs (e.g. `App.vue?vue&type=script&lang.jsx`)
2 changes: 1 addition & 1 deletion packages/plugin-vue/package.json
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
},
"devDependencies": {
"@jridgewell/gen-mapping": "^0.3.2",
"@jridgewell/trace-mapping": "^0.3.14",
"@jridgewell/trace-mapping": "^0.3.15",
"debug": "^4.3.4",
"rollup": ">=2.75.6 <2.77.0 || ~2.77.0",
"slash": "^4.0.0",
4 changes: 2 additions & 2 deletions packages/plugin-vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -54,11 +54,11 @@ export interface Options {

/**
* Enable Vue reactivity transform (experimental).
* https://github.com/vuejs/core/tree/master/packages/reactivity-transform
* https://vuejs.org/guide/extras/reactivity-transform.html
* - `true`: transform will be enabled for all vue,js(x),ts(x) files except
* those inside node_modules
* - `string | RegExp`: apply to vue + only matched files (will include
* node_modules, so specify directories in necessary)
* node_modules, so specify directories if necessary)
* - `false`: disable in all cases
*
* @default false
Loading