Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: v6 translation #1075

Merged
merged 124 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
64cc42a
feat: Environment API
Gumball12 Nov 30, 2024
d9179c8
chore(deps): update all non-major dependencies
Gumball12 Nov 30, 2024
cfd5403
docs: edit Manual Install instructions on docs guide page
Gumball12 Nov 30, 2024
5b5bb69
docs: update Environment API guide after beta
Gumball12 Nov 30, 2024
a7043b0
docs: fix small typo in Environment API
Gumball12 Nov 30, 2024
6fef4a5
docs(static-deploy): add npm install to render's build command
Gumball12 Nov 30, 2024
c5143ae
docs: add vitepress-plugin-group-icons
Gumball12 Nov 30, 2024
f283ea6
refactor: remove the need for "processSourceMap"
Gumball12 Nov 30, 2024
465abe1
docs: correct variable name in build.lib.fileName option description
Gumball12 Nov 30, 2024
51b9bbd
fix(vite): refactor "module cache" to "evaluated modules", pass down …
Gumball12 Nov 30, 2024
7e2df63
fix: require serialization for HMRConnection.send on implementation side
Gumball12 Nov 30, 2024
f245e7c
feat: introduce RunnableDevEnvironment
Gumball12 Nov 30, 2024
4b57c17
docs: make docsearch background darker
Gumball12 Nov 30, 2024
2403f2c
chore(docs): add margin to h4
Gumball12 Nov 30, 2024
1f3df31
docs: update EsbuildBuildOptions link
Gumball12 Nov 30, 2024
0ef924f
chore: docs style
Gumball12 Nov 30, 2024
c3f564d
refactor: rename runner.destroy() to runner.close()
Gumball12 Nov 30, 2024
37cb994
docs: change npm and pnpm to be lowercase
Gumball12 Nov 30, 2024
776e22a
docs: env expand feature only works for variables in env files
Gumball12 Nov 30, 2024
95909f0
docs: relative base path
Gumball12 Nov 30, 2024
0aa49fa
docs: add multiple entries lib mode example
Gumball12 Nov 30, 2024
25ffa2e
chore(deps)!: migrate fast-glob to tinyglobby
Gumball12 Nov 30, 2024
09efe04
docs: mention pre-bundle uses esbuild in dev
Gumball12 Nov 30, 2024
e46f44f
docs: server.proxy has precedence over Vite's internal middlewares
Gumball12 Nov 30, 2024
9e7bed3
docs: clarify where it applies for each config options
Gumball12 Nov 30, 2024
3659701
docs: clarify target in tsconfig.json
Gumball12 Nov 30, 2024
ae66aa8
docs: change docs to include more details about public directory
Gumball12 Dec 1, 2024
ab19598
feat: add .git to deny list by default
Gumball12 Dec 1, 2024
b93030c
docs(backend-integration): add an example importedChunks
Gumball12 Dec 1, 2024
c6b0968
docs: reload due to gsap and shiki
Gumball12 Dec 1, 2024
9ce877d
chore: update moduleResolution value casing
Gumball12 Dec 1, 2024
12aff93
docs(landing): add AdonisJS logo
Gumball12 Dec 1, 2024
8af14c7
refactor!: bump minimal terser version to 5.16.0
Gumball12 Dec 1, 2024
06e1667
docs: refactor environment api docs
Gumball12 Dec 1, 2024
08cb42b
refactor: use builder in build
Gumball12 Dec 1, 2024
d8171f0
feat(json)!: add json.stringify: 'auto' and make that the default
Gumball12 Dec 1, 2024
aab2dad
docs: add some migration guide for v6
Gumball12 Dec 1, 2024
06d4df8
fix(preview): set resolvedUrls null after close
Gumball12 Dec 1, 2024
5c70e22
fix!: default build.cssMinify to 'esbuild' for SSR
Gumball12 Dec 1, 2024
ea4b331
feat(css)!: load postcss config within workspace root only
Gumball12 Dec 1, 2024
08d578e
feat(css)!: change default sass api to modern/modern-compiler
Gumball12 Dec 1, 2024
f3a39d0
docs: migration guide for plugin-commonjs upgrade
Gumball12 Dec 1, 2024
dcbaba2
fix(manifest): non entry CSS chunk src was wrong
Gumball12 Dec 1, 2024
2488658
chore(deps)!: update postcss-load-config to v6
Gumball12 Dec 2, 2024
8784771
refactor: optimizeDeps back to top level
Gumball12 Dec 7, 2024
c036ca5
docs: top-level client environment config
Gumball12 Dec 7, 2024
75d3de1
fix(config): remove error if require resolve to esm
Gumball12 Dec 7, 2024
0656cd1
feat!: update to chokidar v4
Gumball12 Dec 7, 2024
3ace1f8
docs: missing changes guides
Gumball12 Dec 7, 2024
c77109f
feat(html): support vite-ignore attribute to opt-out of processing
Gumball12 Dec 7, 2024
f38ee46
feat(lib)!: use package name for css output file name
Gumball12 Dec 7, 2024
cb72472
docs: migration guide for vitejs#18070
Gumball12 Dec 7, 2024
ab0ac47
refactor!: remove fs.cachedChecks option
Gumball12 Dec 7, 2024
e2b291f
feat(html)!: support more asset sources
Gumball12 Dec 7, 2024
17be103
docs(migration): add section for html asset sources
Gumball12 Dec 7, 2024
0a19453
feat(resolve)!: allow removing conditions
Gumball12 Dec 7, 2024
31a203b
feat(asset): add ?inline and ?no-inline queries to control inlining
Gumball12 Dec 7, 2024
9823b67
docs: remove horizontal scrollbars in code blocks
Gumball12 Dec 7, 2024
a24f05f
docs(config): remove unused argument command
Gumball12 Dec 7, 2024
1bbebe0
docs(migration): add bundle size note about strictRequires true
Gumball12 Dec 7, 2024
4cc1d3f
docs(migration): add a note about using a CommonJS file as an entrypoint
Gumball12 Dec 7, 2024
30f4812
chore: upgrade to express 5
Gumball12 Dec 7, 2024
d9e50a9
docs: clarify dynamic new URL(foo, import.meta.url) behavior
Gumball12 Dec 7, 2024
cac4209
feat: use a single transport for fetchModule and HMR support
Gumball12 Dec 7, 2024
55bbf8a
docs: fix typo
Gumball12 Dec 7, 2024
66c092d
docs: update haoqunjiang's info in team emeriti section
Gumball12 Dec 7, 2024
a258b5c
docs: fix attribute in example
Gumball12 Dec 7, 2024
ae91a4b
docs: fix mobile menu background on light mode landing page
Gumball12 Dec 7, 2024
c383a76
docs: expand description of externalConditions
Gumball12 Dec 7, 2024
54db452
docs: note about a silly edge case in the ssr guide
Gumball12 Dec 7, 2024
a96ed00
feat: add ssr.resolve.mainFields option
Gumball12 Dec 7, 2024
9ec179f
feat: extended applyToEnvironment and perEnvironmentPlugin
Gumball12 Dec 7, 2024
d3ace0b
feat: expose default mainFields/conditions
Gumball12 Dec 7, 2024
094e08a
revert: use chokidar v3
Gumball12 Dec 7, 2024
0aa36ff
docs(migration): add entry for vitejs#17922
Gumball12 Dec 7, 2024
8eda152
docs: rename HotUpdateContext to HotUpdateOptions
Gumball12 Dec 7, 2024
7c8bffb
fix(deps)!: update dependency dotenv-expand to v12
Gumball12 Dec 7, 2024
f977432
docs: update @cpojer avatar on the landing page
Gumball12 Dec 7, 2024
655c9de
feat: enable HMR by default on ModuleRunner side
Gumball12 Dec 7, 2024
6b26c76
docs(migration): note ssr-only module reload
Gumball12 Dec 7, 2024
6ccb23d
docs: changes ssr using module runner
Gumball12 Dec 7, 2024
9c1a9a2
docs: add missing types in env API docs
Gumball12 Dec 7, 2024
5d3484d
docs: add voidzero logo to the sidebar
Gumball12 Dec 7, 2024
6ba1250
docs: vite 6 announcement post
Gumball12 Dec 7, 2024
fea473b
revert: update moduleResolution value casing
Gumball12 Dec 7, 2024
4cf05b2
docs: link correctly to vite 5/6 docs versions
Gumball12 Dec 7, 2024
2f6492f
fix(manifest): use style.css as a key for the style file for cssCodes…
Gumball12 Dec 7, 2024
679835c
docs: clarify .env loading precedence / behavior
Gumball12 Dec 7, 2024
7f4d2f9
fix(deps): update all non-major dependencies & update contributing
Gumball12 Dec 7, 2024
c0eec79
docs(assets): update static asset URL transformation in dev
Gumball12 Dec 7, 2024
eef6439
docs: correct docs about plugin-react-swc
Gumball12 Dec 7, 2024
126948b
fix: make result interfaces for ModuleRunnerTransport#invoke more exp…
Gumball12 Dec 7, 2024
c2eeca3
docs(api-environment): remove outdated text content
Gumball12 Dec 7, 2024
e0fbe61
docs: fix typo "constrains" to "constraints"
Gumball12 Dec 7, 2024
7edb298
docs: add SvelteKit to the Environment API story
Gumball12 Dec 7, 2024
9aaae3a
docs: fix typo in v6 announcement
Gumball12 Dec 7, 2024
1234984
docs: tweak wordings in Environment API doc
Gumball12 Dec 7, 2024
b403eca
docs: add profile card
Gumball12 Dec 7, 2024
e44c306
fix: build error
Gumball12 Dec 8, 2024
1dbc5c0
chore(deps): update all non-major dependencies
Gumball12 Dec 9, 2024
8457662
docs: bring back the UwU logo
Gumball12 Dec 14, 2024
62b7c4c
docs: display file name in a better way
Gumball12 Dec 28, 2024
be47f50
fix(deps): update all non-major dependencies
Gumball12 Dec 28, 2024
0dd6b12
fix: replace runner-side path normalization with fetchModule-side res…
Gumball12 Dec 28, 2024
0deec91
docs: fix canonical links
Gumball12 Dec 28, 2024
e030ba9
docs: make SSR page easier to be found
Gumball12 Jan 6, 2025
d9db88f
docs: add Hono to framework examples
Gumball12 Jan 6, 2025
bcf5eb9
docs: translate config.ts to Korean
Gumball12 Jan 6, 2025
48d9f29
docs: translate api-environment.md to Korean
Gumball12 Jan 6, 2025
786563e
docs: translate api-environment-frameworks to Korean
Gumball12 Jan 6, 2025
044dff4
docs: translate api-environment-instances.md to Korean
Gumball12 Jan 6, 2025
4c4de5e
docs: translate api-environment-plugins.md to Korean
Gumball12 Jan 7, 2025
05b5b02
docs: translate api-environment-runtimes.md to Korean
Gumball12 Jan 9, 2025
fb9abcd
docs: translate api-javascript.md to Korean
Gumball12 Jan 9, 2025
b578998
docs: translate assets.md to Korean
Gumball12 Jan 9, 2025
ca1c3b3
docs: translate backend-integration.md to Korean
Gumball12 Jan 9, 2025
5436154
docs: translate build.md to Korean
Gumball12 Jan 9, 2025
633ecc3
docs: translate cli.md to Korean
Gumball12 Jan 9, 2025
137660a
docs: translate features.md to Korean
Gumball12 Jan 9, 2025
062786a
docs: translate guide/index.md to Korean
Gumball12 Jan 9, 2025
ca1bdaf
docs: translate migration.md to Korean
Gumball12 Jan 9, 2025
7bbda37
docs: translate why.md to Korean
Gumball12 Jan 9, 2025
38a516e
docs: translate config/ to Korean
Gumball12 Jan 9, 2025
d55c0d9
docs: translate changes/* to Korean
Gumball12 Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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