diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 91b3cfd45d7866..ae120b3ae02419 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -78,13 +78,13 @@ body: required: true - label: Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). required: true - - label: Read the [docs](https://vitejs.dev/guide). + - label: Read the [docs](https://vite.dev/guide). required: true - label: Check that there isn't [already an issue](https://github.com/vitejs/vite/issues) that reports the same bug to avoid creating a duplicate. required: true - label: Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to [vuejs/core](https://github.com/vuejs/core) instead. required: true - - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vitejs.dev/). + - label: Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitejs/vite/discussions) or join our [Discord Chat Server](https://chat.vite.dev/). required: true - label: The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f85f41ebbd3809..e36d5d53edcd7f 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -7,7 +7,7 @@ contact_links: url: https://github.com/vitejs/vite-plugin-vue/issues/new/choose about: Vue related issues should be reported on the vite-plugin-vue repository. - name: Discord Chat - url: https://chat.vitejs.dev + url: https://chat.vite.dev about: Ask questions and discuss with other Vite users in real time. - name: Questions & Discussions url: https://github.com/vitejs/vite/discussions diff --git a/.github/ISSUE_TEMPLATE/docs.yml b/.github/ISSUE_TEMPLATE/docs.yml index 845070d9e1b34e..ef629b96596663 100644 --- a/.github/ISSUE_TEMPLATE/docs.yml +++ b/.github/ISSUE_TEMPLATE/docs.yml @@ -1,5 +1,5 @@ name: "\U0001F4DA Documentation" -description: Suggest a change or new page to be added to vitejs.dev +description: Suggest a change or new page to be added to vite.dev labels: [documentation] body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index da45736c4c6dde..348a9c731416e8 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -41,7 +41,7 @@ body: required: true - label: Read the [Contributing Guidelines](https://github.com/vitejs/vite/blob/main/CONTRIBUTING.md). required: true - - label: Read the [docs](https://vitejs.dev/guide). + - label: Read the [docs](https://vite.dev/guide). required: true - label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate. required: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 827644dbb7faf1..2b271bc0178a38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,7 @@ jobs: - name: Get changed files id: changed-files - uses: tj-actions/changed-files@48d8f15b2aaa3d255ca5af3eba4870f807ce6b3c # v45.0.2 + uses: tj-actions/changed-files@c3a1bb2c992d77180ae65be6ae6c166cf40f857c # v45.0.3 with: files: | docs/** @@ -129,6 +129,22 @@ jobs: - name: Test build run: pnpm run test-build + test-passed: + if: (!cancelled() && !failure()) + needs: test + runs-on: ubuntu-latest + name: Build & Test Passed or Skipped + steps: + - run: echo "Build & Test Passed or Skipped" + + test-failed: + if: (!cancelled() && failure()) + needs: test + runs-on: ubuntu-latest + name: Build & Test Failed + steps: + - run: echo "Build & Test Failed" + lint: timeout-minutes: 10 runs-on: ubuntu-latest @@ -155,7 +171,7 @@ jobs: run: pnpm run lint - name: Check formatting - run: pnpm prettier --check . + run: pnpm prettier --write --log-level=warn . && git diff --exit-code - name: Typecheck run: pnpm run typecheck diff --git a/.github/workflows/lock-closed-issues.yml b/.github/workflows/lock-closed-issues.yml index fc3002d6d5d8ab..64b585e7a3f48a 100644 --- a/.github/workflows/lock-closed-issues.yml +++ b/.github/workflows/lock-closed-issues.yml @@ -19,6 +19,6 @@ jobs: #issue-comment: | # This issue has been locked since it has been closed for more than 14 days. # - # If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vitejs.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions). + # If you have found a concrete bug or regression related to it, please open a new [bug report](https://github.com/vitejs/vite/issues/new/choose) with a reproduction against the latest Vite version. If you have any other comments you should join the chat at [Vite Land](https://chat.vite.dev) or create a new [discussion](https://github.com/vitejs/vite/discussions). issue-lock-reason: "" process-only: "issues" diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8c0ecf5ab85f8c..e357d2b1598ef0 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [Vite Land](https://chat.vitejs.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team by DM at [Vite Land](https://chat.vite.dev). All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f624e76897e578..1b12842b9d82d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Vite Contributing Guide -Hi! We're really excited that you're interested in contributing to Vite! Before submitting your contribution, please read through the following guide. We also suggest you read the [Project Philosophy](https://vitejs.dev/guide/philosophy) in our documentation. +Hi! We're really excited that you're interested in contributing to Vite! Before submitting your contribution, please read through the following guide. We also suggest you read the [Project Philosophy](https://vite.dev/guide/philosophy) in our documentation. You can use [StackBlitz Codeflow](https://stackblitz.com/codeflow) to fix bugs or implement features. You'll see a Codeflow button on issues to start a PR to fix them. A button will also appear on PRs to review them without needing to check out the branch locally. When using Codeflow, the Vite repository will be cloned for you in an online editor, with the Vite package built in watch mode ready to test your changes. If you'd like to learn more, check out the [Codeflow docs](https://developer.stackblitz.com/codeflow/what-is-codeflow). diff --git a/LICENSE b/LICENSE index 9c1b313d7b1816..b7e97ecb6aa4dd 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019-present, Yuxi (Evan) You and Vite contributors +Copyright (c) 2019-present, VoidZero Inc. and Vite contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index db366bf065a607..205c4701a52e4f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- - Vite logo + + Vite logo


@@ -9,7 +9,7 @@ node compatibility build status Start new PR in StackBlitz Codeflow - discord chat + discord chat


@@ -26,13 +26,13 @@ Vite (French word for "quick", pronounced [`/vit/`](https://cdn.jsdelivr.net/gh/vitejs/vite@main/docs/public/vite.mp3), like "veet") is a new breed of frontend build tooling that significantly improves the frontend development experience. It consists of two major parts: -- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vitejs.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vitejs.dev/guide/features.html#hot-module-replacement). +- A dev server that serves your source files over [native ES modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), with [rich built-in features](https://vite.dev/guide/features.html) and astonishingly fast [Hot Module Replacement (HMR)](https://vite.dev/guide/features.html#hot-module-replacement). -- A [build command](https://vitejs.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. +- A [build command](https://vite.dev/guide/build.html) that bundles your code with [Rollup](https://rollupjs.org), pre-configured to output highly optimized static assets for production. -In addition, Vite is highly extensible via its [Plugin API](https://vitejs.dev/guide/api-plugin.html) and [JavaScript API](https://vitejs.dev/guide/api-javascript.html) with full typing support. +In addition, Vite is highly extensible via its [Plugin API](https://vite.dev/guide/api-plugin.html) and [JavaScript API](https://vite.dev/guide/api-javascript.html) with full typing support. -[Read the Docs to Learn More](https://vitejs.dev). +[Read the Docs to Learn More](https://vite.dev). ## Packages diff --git a/docs/.vitepress/buildEnd.config.ts b/docs/.vitepress/buildEnd.config.ts index 52a3625ceb3957..8e0d72b7359849 100644 --- a/docs/.vitepress/buildEnd.config.ts +++ b/docs/.vitepress/buildEnd.config.ts @@ -4,7 +4,7 @@ import { Feed } from 'feed' import type { SiteConfig } from 'vitepress' import { createContentLoader } from 'vitepress' -const siteUrl = 'https://vitejs.dev' +const siteUrl = 'https://vite.dev' const blogUrl = `${siteUrl}/blog` export const buildEnd = async (config: SiteConfig): Promise => { @@ -14,9 +14,9 @@ export const buildEnd = async (config: SiteConfig): Promise => { id: blogUrl, link: blogUrl, language: 'en', - image: 'https://vitejs.dev/og-image.png', - favicon: 'https://vitejs.dev/logo.svg', - copyright: 'Copyright © 2019-present Evan You & Vite Contributors', + image: 'https://vite.dev/og-image.png', + favicon: 'https://vite.dev/logo.svg', + copyright: 'Copyright © 2019-present VoidZero Inc. & Vite Contributors', }) const posts = await createContentLoader('blog/*.md', { diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 53d1d485caeafa..8c706a92aa725a 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,12 +1,16 @@ import type { DefaultTheme } from 'vitepress' import { defineConfig } from 'vitepress' import { transformerTwoslash } from '@shikijs/vitepress-twoslash' +import { + groupIconMdPlugin, + groupIconVitePlugin, +} from 'vitepress-plugin-group-icons' import { buildEnd } from './buildEnd.config' const ogDescription = 'Next Generation Frontend Tooling' -const ogImage = 'https://vitejs.dev/og-image.png' +const ogImage = 'https://vite.dev/og-image.jpg' const ogTitle = 'Vite' -const ogUrl = 'https://vitejs.dev' +const ogUrl = 'https://vite.dev' // netlify envs const deployURL = process.env.DEPLOY_PRIME_URL || '' @@ -36,15 +40,15 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => { const oldVersions: DefaultTheme.NavItemWithLink[] = [ { text: 'Vite 4 Docs', - link: 'https://v4.vitejs.dev', + link: 'https://v4.vite.dev', }, { text: 'Vite 3 Docs', - link: 'https://v3.vitejs.dev', + link: 'https://v3.vite.dev', }, { text: 'Vite 2 Docs', - link: 'https://v2.vitejs.dev', + link: 'https://v2.vite.dev', }, ] @@ -54,7 +58,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => { return [ { text: 'Vite 5 Docs (release)', - link: 'https://vitejs.dev', + link: 'https://vite.dev', }, ...oldVersions, ] @@ -73,6 +77,30 @@ export default defineConfig({ 'link', { rel: 'alternate', type: 'application/rss+xml', href: '/blog.rss' }, ], + ['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }], + [ + 'link', + { + rel: 'preconnect', + href: 'https://fonts.gstatic.com', + crossorigin: 'true', + }, + ], + [ + 'link', + { + rel: 'preload', + href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600&family=IBM+Plex+Mono:wght@400&display=swap', + as: 'style', + }, + ], + [ + 'link', + { + rel: 'stylesheet', + href: 'https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Manrope:wght@600&family=IBM+Plex+Mono:wght@400&display=swap', + }, + ], ['link', { rel: 'me', href: 'https://m.webtoo.ls/@vite' }], ['meta', { property: 'og:type', content: 'website' }], ['meta', { property: 'og:title', content: ogTitle }], @@ -96,12 +124,12 @@ export default defineConfig({ locales: { root: { label: 'English' }, - zh: { label: '简体中文', link: 'https://cn.vitejs.dev' }, - ja: { label: '日本語', link: 'https://ja.vitejs.dev' }, - es: { label: 'Español', link: 'https://es.vitejs.dev' }, - pt: { label: 'Português', link: 'https://pt.vitejs.dev' }, - ko: { label: '한국어', link: 'https://ko.vitejs.dev' }, - de: { label: 'Deutsch', link: 'https://de.vitejs.dev' }, + zh: { label: '简体中文', link: 'https://cn.vite.dev' }, + ja: { label: '日本語', link: 'https://ja.vite.dev' }, + es: { label: 'Español', link: 'https://es.vite.dev' }, + pt: { label: 'Português', link: 'https://pt.vite.dev' }, + ko: { label: '한국어', link: 'https://ko.vite.dev' }, + de: { label: 'Deutsch', link: 'https://de.vite.dev' }, }, themeConfig: { @@ -115,13 +143,13 @@ export default defineConfig({ socialLinks: [ { icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@vite' }, { icon: 'twitter', link: 'https://twitter.com/vite_js' }, - { icon: 'discord', link: 'https://chat.vitejs.dev' }, + { icon: 'discord', link: 'https://chat.vite.dev' }, { icon: 'github', link: 'https://github.com/vitejs/vite' }, ], algolia: { appId: '7H67QR5P0A', - apiKey: 'deaab78bcdfe96b599497d25acc6460e', + apiKey: '208bb9c14574939326032b937431014b', indexName: 'vitejs', searchParameters: { facetFilters: ['tags:en'], @@ -135,7 +163,7 @@ export default defineConfig({ footer: { message: `Released under the MIT License. (${commitRef})`, - copyright: 'Copyright © 2019-present Evan You & Vite Contributors', + copyright: 'Copyright © 2019-present VoidZero Inc. & Vite Contributors', }, nav: [ @@ -160,7 +188,7 @@ export default defineConfig({ }, { text: 'Discord Chat', - link: 'https://chat.vitejs.dev', + link: 'https://chat.vite.dev', }, { text: 'Awesome Vite', @@ -287,12 +315,33 @@ export default defineConfig({ link: '/guide/api-javascript', }, { - text: 'Environment API', + text: 'Config Reference', + link: '/config/', + }, + ], + }, + { + text: 'Environment API', + items: [ + { + text: 'Introduction', link: '/guide/api-environment', }, { - text: 'Config Reference', - link: '/config/', + text: 'Environment instances', + link: '/guide/api-environment-instances', + }, + { + text: 'Plugins', + link: '/guide/api-environment-plugins', + }, + { + text: 'Frameworks', + link: '/guide/api-environment-frameworks', + }, + { + text: 'Runtimes', + link: '/guide/api-environment-runtimes', }, ], }, @@ -394,6 +443,33 @@ export default defineConfig({ }, markdown: { codeTransformers: [transformerTwoslash()], + config(md) { + md.use(groupIconMdPlugin) + }, + }, + vite: { + plugins: [ + groupIconVitePlugin({ + customIcon: { + firebase: 'vscode-icons:file-type-firebase', + '.gitlab-ci.yml': 'vscode-icons:file-type-gitlab', + }, + }), + ], + environments: { + client: { + dev: { + optimizeDeps: { + include: [ + '@shikijs/vitepress-twoslash/client', + 'gsap', + 'gsap/dist/ScrollTrigger', + 'gsap/dist/MotionPathPlugin', + ], + }, + }, + }, + }, }, buildEnd, }) diff --git a/docs/.vitepress/theme/components/AsideSponsors.vue b/docs/.vitepress/theme/components/AsideSponsors.vue index 26b72345e2f0b9..b8e6cfe778453b 100644 --- a/docs/.vitepress/theme/components/AsideSponsors.vue +++ b/docs/.vitepress/theme/components/AsideSponsors.vue @@ -20,14 +20,14 @@ const sponsors = computed(() => {