Skip to content

Commit

Permalink
Merge branch 'main' into pr/sapphi-red/16238
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed May 29, 2024
2 parents 6c4e853 + 48edfcd commit 7f9c5e2
Show file tree
Hide file tree
Showing 82 changed files with 2,577 additions and 2,159 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

260 changes: 0 additions & 260 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@a29e8b565651ce417abb5db7164b4a2ad8b6155c # v44.4.0
uses: tj-actions/changed-files@03334d095e2739fa9ac4034ec16f66d5d01e9eba # v44.5.1
with:
files: |
docs/**
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
- name: Get pkgName for tag
id: tag
run: |
# skip if alpha
if [[ $GITHUB_REF_NAME =~ alpha ]]; then
exit 0
fi
# matching v2.0.0 / v2.0.0-beta.8 etc
if [[ $GITHUB_REF_NAME =~ ^v.+ ]]; then
pkgName="vite"
Expand All @@ -31,6 +36,8 @@ jobs:
echo "pkgName=$pkgName" >> $GITHUB_OUTPUT
- name: Create Release for Tag
# only run if tag is not alpha
if: steps.tag.outputs.pkgName
id: release_tag
uses: yyx990803/release-tag@master
env:
Expand Down
9 changes: 5 additions & 4 deletions docs/.vitepress/buildEnd.config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import path from 'path'
import { writeFileSync } from 'fs'
import path from 'node:path'
import { writeFileSync } from 'node:fs'
import { Feed } from 'feed'
import { createContentLoader, type SiteConfig } from 'vitepress'
import type { SiteConfig } from 'vitepress'
import { createContentLoader } from 'vitepress'

const siteUrl = 'https://vitejs.dev'
const blogUrl = `${siteUrl}/blog`

export const buildEnd = async (config: SiteConfig) => {
export const buildEnd = async (config: SiteConfig): Promise<void> => {
const feed = new Feed({
title: 'Vite',
description: 'Next Generation Frontend Tooling',
Expand Down
12 changes: 7 additions & 5 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineConfig, DefaultTheme } from 'vitepress'
import type { DefaultTheme } from 'vitepress'
import { defineConfig } from 'vitepress'
import { transformerTwoslash } from '@shikijs/vitepress-twoslash'
import { buildEnd } from './buildEnd.config'

Expand Down Expand Up @@ -78,6 +79,7 @@ export default defineConfig({
['meta', { property: 'og:image', content: ogImage }],
['meta', { property: 'og:url', content: ogUrl }],
['meta', { property: 'og:description', content: ogDescription }],
['meta', { property: 'og:site_name', content: 'vitejs' }],
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
['meta', { name: 'twitter:site', content: '@vite_js' }],
['meta', { name: 'theme-color', content: '#646cff' }],
Expand Down Expand Up @@ -341,10 +343,10 @@ export default defineConfig({
.replace(/\/index\.md$/, '/')
.replace(/\.md$/, '/')
pageData.frontmatter.head ??= []
pageData.frontmatter.head.unshift([
'link',
{ rel: 'canonical', href: canonicalUrl },
])
pageData.frontmatter.head.unshift(
['link', { rel: 'canonical', href: canonicalUrl }],
['meta', { property: 'og:title', content: pageData.title }],
)
return pageData
},
markdown: {
Expand Down
2 changes: 1 addition & 1 deletion docs/.vitepress/theme/composables/sponsor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref, onMounted, onUnmounted } from 'vue'
import { onMounted, onUnmounted, ref } from 'vue'

interface Sponsors {
special: Sponsor[]
Expand Down
2 changes: 1 addition & 1 deletion docs/config/server-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ Configure custom proxy rules for the dev server. Expects an object of `{ key: op

Note that if you are using non-relative [`base`](/config/shared-options.md#base), you must prefix each key with that `base`.

Extends [`http-proxy`](https://github.com/http-party/node-http-proxy#options). Additional options are [here](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/proxy.ts#L13).
Extends [`http-proxy`](https://github.com/http-party/node-http-proxy#options). Additional options are [here](https://github.com/vitejs/vite/blob/main/packages/vite/src/node/server/middlewares/proxy.ts#L13). Note that [unlike http-proxy](https://github.com/http-party/node-http-proxy/issues/1669), the `changeOrigin` option will change both host and origin headers to match the target.

In some cases, you might also want to configure the underlying dev server (e.g. to add custom middlewares to the internal [connect](https://github.com/senchalabs/connect) app). In order to do that, you need to write your own [plugin](/guide/using-plugins.html) and use [configureServer](/guide/api-plugin.html#configureserver) function.

Expand Down
Loading

0 comments on commit 7f9c5e2

Please sign in to comment.