Skip to content

Commit

Permalink
docs: v6 translation (#1075)
Browse files Browse the repository at this point in the history
* feat: Environment API

resolved #939

* chore(deps): update all non-major dependencies

resolved #940
resolved #944
resolved #951
resolved #954
resolved #968
resolved #976
resolved #1007
resolved #1021
resolved #1048

* docs: edit Manual Install instructions on docs guide page

resolved #941

* docs: update Environment API guide after beta

resolved #942

* docs: fix small typo in Environment API

resolved #943

* docs(static-deploy): add npm install to render's build command

resolved #945

* docs: add vitepress-plugin-group-icons

resolved #946

* refactor: remove the need for "processSourceMap"

resolved #948

* docs: correct variable name in build.lib.fileName option description

resolved #949

* fix(vite): refactor "module cache" to "evaluated modules", pass down module to "runInlinedModule"

resolved #950

* fix: require serialization for HMRConnection.send on implementation side

resolved #952

* feat: introduce RunnableDevEnvironment

resolved #953

* docs: make docsearch background darker

resolved #964

* chore(docs): add margin to h4

resolved #966

* docs: update EsbuildBuildOptions link

resolved #967

* chore: docs style

resolved #970

* refactor: rename runner.destroy() to runner.close()

resolved #971

* docs: change npm and pnpm to be lowercase

resolved #972

* docs: env expand feature only works for variables in env files

resolved #978

* docs: relative base path

resolved #979

* docs: add multiple entries lib mode example

resolved #980

* chore(deps)!: migrate fast-glob to tinyglobby

resolved #981

* docs: mention pre-bundle uses esbuild in dev

resolved #982

* docs: server.proxy has precedence over Vite's internal middlewares

resolved #983

* docs: clarify where it applies for each config options

resolved #984

* docs: clarify target in tsconfig.json

resolved #985

* docs: change docs to include more details about public directory

resolved #986

* feat: add .git to deny list by default

resolved #987

* docs(backend-integration): add an example importedChunks

resolved #988

* docs: reload due to gsap and shiki

resolved #989

* chore: update moduleResolution value casing

resolved #990

* docs(landing): add AdonisJS logo

resolved #993

* refactor!: bump minimal terser version to 5.16.0

resolved #994

* docs: refactor environment api docs

resolved #975

* refactor: use builder in build

resolved #996

* feat(json)!: add json.stringify: 'auto' and make that the default

resolved #997

* docs: add some migration guide for v6

resolved #998

* fix(preview): set resolvedUrls null after close

resolved #999

* fix!: default build.cssMinify to 'esbuild' for SSR

resolved #1000

* feat(css)!: load postcss config within workspace root only

resolved #1001

* feat(css)!: change default sass api to modern/modern-compiler

resolved #1002

* docs: migration guide for plugin-commonjs upgrade

resolved #1003

* fix(manifest): non entry CSS chunk src was wrong

resolved #1004

* chore(deps)!: update postcss-load-config to v6

resolved #1005

* refactor: optimizeDeps back to top level

resolved #1006

* docs: top-level client environment config

resolved #1008

* fix(config): remove error if require resolve to esm

resolved #1009

* feat!: update to chokidar v4

resolved #1010

* docs: missing changes guides

resolved #1011

* feat(html): support vite-ignore attribute to opt-out of processing

resolved #1012

* feat(lib)!: use package name for css output file name

resolved #1013

* docs: migration guide for vitejs#18070

resolved #1014

* refactor!: remove fs.cachedChecks option

resolved #1015

* feat(html)!: support more asset sources

resolved #1016

* docs(migration): add section for html asset sources

resolved #1017

* feat(resolve)!: allow removing conditions

resolved #1018

* feat(asset): add ?inline and ?no-inline queries to control inlining

resolved #1022

* docs: remove horizontal scrollbars in code blocks

resolved #1025

* docs(config): remove unused argument command

resolved #1027

* docs(migration): add bundle size note about strictRequires true

resolved #1028

* docs(migration): add a note about using a CommonJS file as an entrypoint

resolved #1029

* chore: upgrade to express 5

resolved #1030

* docs: clarify dynamic new URL(foo, import.meta.url) behavior

resolved #1031

* feat: use a single transport for fetchModule and HMR support

resolved #1032

* docs: fix typo

resolved #1035

* docs: update haoqunjiang's info in team emeriti section

resolved #1036

* docs: fix attribute in example

resolved #1038

* docs: fix mobile menu background on light mode landing page

resolved #1039

* docs: expand description of externalConditions

resolved #1041

* docs: note about a silly edge case in the ssr guide

resolved #1042

* feat: add ssr.resolve.mainFields option

resolved #1043

* feat: extended applyToEnvironment and perEnvironmentPlugin

resolved #1044

* feat: expose default mainFields/conditions

resolved #1045

* revert: use chokidar v3

resolved #1046

* docs(migration): add entry for vitejs#17922

resolved #1047

* docs: rename HotUpdateContext to HotUpdateOptions

resolved #1049

* fix(deps)!: update dependency dotenv-expand to v12

resolved #1050

* docs: update @cpojer avatar on the landing page

resolved #1051

* feat: enable HMR by default on ModuleRunner side

resolved #1053

* docs(migration): note ssr-only module reload

resolved #1054

* docs: changes ssr using module runner

resolved #1055

* docs: add missing types in env API docs

resolved #1056

* docs: add voidzero logo to the sidebar

resolved #1057

* docs: vite 6 announcement post

resolved #1058

* revert: update moduleResolution value casing

resolved #1059

* docs: link correctly to vite 5/6 docs versions

resolved #1060

* fix(manifest): use style.css as a key for the style file for cssCodesplit: false

resolved #1061

* docs: clarify .env loading precedence / behavior

resolved #1062

* fix(deps): update all non-major dependencies & update contributing

resolved #1064

* docs(assets): update static asset URL transformation in dev

resolved #1065

* docs: correct docs about plugin-react-swc

resolved #1066

* fix: make result interfaces for ModuleRunnerTransport#invoke more explicit

resolved #1067

* docs(api-environment): remove outdated text content

resolved #1068

* docs: fix typo "constrains" to "constraints"

resolved #1069

* docs: add SvelteKit to the Environment API story

resolved #1070

* docs: fix typo in v6 announcement

resolved #1071

* docs: tweak wordings in Environment API doc

resolved #1072

* docs: add profile card

resolved #1073

* fix: build error

* chore(deps): update all non-major dependencies

resolved #1076

* docs: bring back the UwU logo

resolved #1077

* docs: display file name in a better way

resolved #1080

* fix(deps): update all non-major dependencies

resolved #1081
resolved #1082

* fix: replace runner-side path normalization with fetchModule-side resolve

resolved #1083

* docs: fix canonical links

resolved #1084

* docs: make SSR page easier to be found

resolved #1086

* docs: add Hono to framework examples

resolved #1087

* docs: translate config.ts to Korean

* docs: translate api-environment.md to Korean

* docs: translate api-environment-frameworks to Korean

* docs: translate api-environment-instances.md to Korean

* docs: translate api-environment-plugins.md to Korean

* docs: translate api-environment-runtimes.md to Korean

* docs: translate api-javascript.md to Korean

* docs: translate assets.md to Korean

* docs: translate backend-integration.md to Korean

* docs: translate build.md to Korean

* docs: translate cli.md to Korean

* docs: translate features.md to Korean

* docs: translate guide/index.md to Korean

* docs: translate migration.md to Korean

* docs: translate why.md to Korean

* docs: translate config/ to Korean

* docs: translate changes/* to Korean
  • Loading branch information
Gumball12 authored Jan 9, 2025
1 parent 6d1d563 commit 28194d4
Show file tree
Hide file tree
Showing 66 changed files with 4,675 additions and 1,927 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ blog/*
config/*
docs/*
guide/*
changes/*
team.md
releases.md
.vitepress/*
Expand Down
132 changes: 111 additions & 21 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,18 @@ import markdownItCustomAnchor from './markdown-it-custom-anchor'
// @ts-ignore
import renderPermalink from './render-permalink'
import markdownItFootnote from 'markdown-it-footnote'
import {
groupIconMdPlugin,
groupIconVitePlugin,
} from 'vitepress-plugin-group-icons'
import { buildEnd } from './buildEnd.config'

const ogDescription = 'Vite, 프런트엔드 개발의 새로운 기준'
const ogImage = 'https://ko.vite.dev/og-image.jpg'
const ogTitle = 'Vite'
const ogUrl = 'https://ko.vite.dev'

// netlify envs
// netlify 환경 변수
const deployURL = process.env.DEPLOY_PRIME_URL || ''
const commitRef = process.env.COMMIT_REF?.slice(0, 8) || 'dev'

Expand All @@ -26,18 +31,13 @@ const deployType = (() => {
return 'release'
}
})()
const additionalTitle = ((): string => {
switch (deployType) {
case 'main':
return ' (main branch)'
case 'local':
return ' (local)'
case 'release':
return ''
}
})()

const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
const oldVersions: DefaultTheme.NavItemWithLink[] = [
{
text: 'Vite 5 문서',
link: 'https://v5.vite.dev',
},
{
text: 'Vite 4 문서',
link: 'https://v4.vite.dev',
Expand All @@ -57,7 +57,7 @@ const versionLinks = ((): DefaultTheme.NavItemWithLink[] => {
case 'local':
return [
{
text: 'Vite 5 문서 (릴리스)',
text: 'Vite 6 문서 (릴리스)',
link: 'https://ko.vite.dev',
},
...oldVersions,
Expand Down Expand Up @@ -141,6 +141,7 @@ export default defineConfig({
},

socialLinks: [
// @ts-ignore
{ icon: 'bluesky', link: 'https://bsky.app/profile/vite.dev' },
{ icon: 'mastodon', link: 'https://elk.zone/m.webtoo.ls/@vite' },
{ icon: 'x', link: 'https://x.com/vite_js' },
Expand Down Expand Up @@ -187,7 +188,7 @@ export default defineConfig({
link: 'https://x.com/vite_js',
},
{
text: 'Discord Chat',
text: 'Discord',
link: 'https://chat.vite.dev',
},
{
Expand All @@ -199,7 +200,7 @@ export default defineConfig({
link: 'https://viteconf.org',
},
{
text: 'DEV 커뮤니티',
text: 'DEV',
link: 'https://dev.to/t/vite',
},
{
Expand Down Expand Up @@ -290,9 +291,13 @@ export default defineConfig({
link: '/guide/philosophy',
},
{
text: 'v4에서 마이그레이션하기',
text: 'v5에서 마이그레이션하기',
link: '/guide/migration',
},
{
text: 'v4에서 마이그레이션하기',
link: '/guide/migration-from-v4',
},
{
text: 'v3에서 마이그레이션하기',
link: '/guide/migration-from-v3',
Expand All @@ -305,6 +310,10 @@ export default defineConfig({
text: 'v1에서 마이그레이션하기',
link: '/guide/migration-from-v1',
},
{
text: '주요 변경 사항',
link: '/changes/',
},
],
},
{
Expand All @@ -322,20 +331,41 @@ export default defineConfig({
text: 'JavaScript API',
link: '/guide/api-javascript',
},
{
text: 'Vite 런타임 API',
link: '/guide/api-vite-runtime',
},
{
text: 'Vite 설정 레퍼런스',
link: '/config/',
},
],
},
{
text: '환경 API',
items: [
{
text: '환경 API',
link: '/guide/api-environment',
},
{
text: '환경 인스턴스',
link: '/guide/api-environment-instances',
},
{
text: '플러그인',
link: '/guide/api-environment-plugins',
},
{
text: '프레임워크',
link: '/guide/api-environment-frameworks',
},
{
text: '런타임',
link: '/guide/api-environment-runtimes',
},
],
},
],
'/config/': [
{
text: 'Config',
text: '설정',
items: [
{
text: 'Vite 설정하기',
Expand Down Expand Up @@ -372,6 +402,45 @@ export default defineConfig({
],
},
],
'/changes/': [
{
text: '주요 변경 사항',
link: '/changes/',
},
{
text: '최신 버전',
items: [],
},
{
text: '예정된 변경 사항',
items: [
{
text: '훅에서 this.environment 사용하기',
link: '/changes/this-environment-in-hooks',
},
{
text: 'HMR hotUpdate 플러그인 훅',
link: '/changes/hotupdate-hook',
},
{
text: '환경별 API로 마이그레이션',
link: '/changes/per-environment-apis',
},
{
text: 'ModuleRunner API를 사용하는 SSR',
link: '/changes/ssr-using-modulerunner',
},
{
text: '빌드 중 공유되는 플러그인',
link: '/changes/shared-plugins-during-build',
},
],
},
{
text: '지난 변경 사항',
items: [],
},
],
},

outline: {
Expand All @@ -381,7 +450,7 @@ export default defineConfig({
transformPageData(pageData) {
const canonicalUrl = `${ogUrl}/${pageData.relativePath}`
.replace(/\/index\.md$/, '/')
.replace(/\.md$/, '/')
.replace(/\.md$/, '')
pageData.frontmatter.head ??= []
pageData.frontmatter.head.unshift(
['link', { rel: 'canonical', href: canonicalUrl }],
Expand All @@ -399,6 +468,27 @@ export default defineConfig({
md.use(markdownItCustomAnchor)
// @ts-ignore
md.use(markdownItFootnote)
// @ts-ignore
md.use(groupIconMdPlugin)
},
},
vite: {
plugins: [
groupIconVitePlugin({
customIcon: {
firebase: 'vscode-icons:file-type-firebase',
'.gitlab-ci.yml': 'vscode-icons:file-type-gitlab',
},
}),
],
optimizeDeps: {
include: [
'@shikijs/vitepress-twoslash/client',
'gsap',
'gsap/dist/ScrollTrigger',
'gsap/dist/MotionPathPlugin',
],
},
},
buildEnd,
})
11 changes: 6 additions & 5 deletions .vitepress/theme/components/AsideSponsors.vue
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<script setup lang="ts">
import { computed } from 'vue'
import { VPDocAsideSponsors } from 'vitepress/theme'
import { useSponsor } from '../composables/sponsor'
import { useSponsor, voidZero } from '../composables/sponsor'
const { data } = useSponsor()
const sponsors = computed(() => {
return (
data?.value.map((sponsor) => {
return [
{ size: 'small', items: [voidZero] },
...(data?.value.map((sponsor) => {
return {
size: sponsor.size === 'big' ? 'mini' : 'xmini',
items: sponsor.items,
}
}) ?? []
)
}) ?? []),
]
})
</script>

Expand Down
37 changes: 37 additions & 0 deletions .vitepress/theme/components/YouTubeVideo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script setup>
defineProps({
videoId: String,
})
</script>

<template>
<div class="full-width-youtube-video">
<iframe
width="560"
height="315"
:src="`https://www.youtube.com/embed/${videoId}`"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen
></iframe>
</div>
</template>

<style scoped>
.full-width-youtube-video {
position: relative;
padding-bottom: 56.25%;
height: 0;
}
.full-width-youtube-video iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
border-radius: 0.5rem;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,12 @@ const isChromiumBrowser = ref(false)
onMounted(() => {
isChromiumBrowser.value = 'chrome' in window
})
// Check for uwu query
const isUwu = ref(false)
onMounted(() => {
isUwu.value = location.search.includes('?uwu')
})
</script>

<template>
Expand All @@ -463,7 +469,12 @@ onMounted(() => {
></div>
</div>
<div class="vite-chip__filter" />
<img src="/logo.svg" alt="Vite Logo" class="vite-chip__logo" />
<img
:src="isUwu ? '/logo-uwu.png' : '/logo.svg'"
:alt="isUwu ? 'Vite Kawaii Logo by @icarusgkx' : 'Vite Logo'"
class="vite-chip__logo"
:class="{ uwu: isUwu }"
/>
</div>
</div>

Expand Down Expand Up @@ -638,6 +649,10 @@ onMounted(() => {
z-index: 3;
}
.uwu.vite-chip__logo {
width: 134px;
}
&.active {
box-shadow: 0 30px 35px -10px rgba(0, 0, 0, 0.6);
transform: translate3d(0, 0, 0) scale(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ const { isCardActive, startAnimation } = useCardAnimation(
<span class="code code__inactive">
<span class="code--red">import</span> { createServer }
<span class="code--red">from</span>
<span class="code--blue">'vite'</span><br /><br />
<span class="code--blue">&nbsp;'vite'</span><br /><br />
<span class="code--red">const</span> server =
<span class="code--red">await</span>
<span class="code--purple">createServer</span>({<br />
<span class="code--purple">&nbsp;createServer</span>({<br />
<span class="code--grey"
>&nbsp;&nbsp;&nbsp;// user config options</span
><br />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ import logoReact from './images/react.svg'
import logoRemix from './images/remix.svg'
import logoSvelte from './images/svelte.svg'
import logoLaravel from './images/laravel.svg'
import logoAdonis from './images/adonis.svg'
import logoEmber from './images/ember.svg'
import logoPreact from './images/preact.svg'
import logoHono from './images/hono.svg'
/**
* The frameworks and tools to display in this section.
Expand Down Expand Up @@ -149,13 +151,27 @@ const frameworks: Framework[] = [
url: 'https://laravel.com/',
visible: ref(false),
},
{
name: 'AdonisJS',
logo: logoAdonis,
color: '#5a45ff',
url: 'https://adonisjs.com/',
visible: ref(false),
},
{
name: 'EmberJS',
logo: logoEmber,
color: '#e04e39',
url: 'https://emberjs.com/',
visible: ref(false),
},
{
name: 'Hono',
logo: logoHono,
color: '#ff5c13',
url: 'https://hono.dev/',
visible: ref(false),
},
]
// Starting parameters
Expand Down
Loading

0 comments on commit 28194d4

Please sign in to comment.