From 638de0ff39efead268ad4d00134e563c3f69e98a Mon Sep 17 00:00:00 2001 From: "@beer" <47961062+iiio2@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:24:02 +0600 Subject: [PATCH] docs: capitalize text (#18951) --- docs/guide/build.md | 2 +- docs/guide/philosophy.md | 2 +- docs/guide/troubleshooting.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/build.md b/docs/guide/build.md index d0c1da79bdab28..e08ad32b247f72 100644 --- a/docs/guide/build.md +++ b/docs/guide/build.md @@ -71,7 +71,7 @@ window.addEventListener('vite:preloadError', (event) => { When a new deployment occurs, the hosting service may delete the assets from previous deployments. As a result, a user who visited your site before the new deployment might encounter an import error. This error happens because the assets running on that user's device are outdated and it tries to import the corresponding old chunk, which is deleted. This event is useful for addressing this situation. -## Rebuild on files changes +## Rebuild on Files Changes You can enable rollup watcher with `vite build --watch`. Or, you can directly adjust the underlying [`WatcherOptions`](https://rollupjs.org/configuration-options/#watch) via `build.watch`: diff --git a/docs/guide/philosophy.md b/docs/guide/philosophy.md index 9e4012825435bc..ccceeb7016241d 100644 --- a/docs/guide/philosophy.md +++ b/docs/guide/philosophy.md @@ -18,7 +18,7 @@ When adding new features, these patterns are followed to create a future-proof A Vite has been focused on performance since its [origins](./why.md). Its dev server architecture allows HMR that stays fast as projects scale. Vite uses native tools like [esbuild](https://esbuild.github.io/) and [SWC](https://github.com/vitejs/vite-plugin-react-swc) to implement intensive tasks but keeps the rest of the code in JS to balance speed with flexibility. When needed, framework plugins will tap into [Babel](https://babeljs.io/) to compile user code. And during build time Vite currently uses [Rollup](https://rollupjs.org/) where bundling size and having access to a wide ecosystem of plugins are more important than raw speed. Vite will continue to evolve internally, using new libraries as they appear to improve DX while keeping its API stable. -## Building Frameworks on top of Vite +## Building Frameworks on Top of Vite Although Vite can be used by users directly, it shines as a tool to create frameworks. Vite core is framework agnostic, but there are polished plugins for each UI framework. Its [JS API](./api-javascript.md) allows App Framework authors to use Vite features to create tailored experiences for their users. Vite includes support for [SSR primitives](./ssr.md), usually present in higher-level tools but fundamental to building modern web frameworks. And Vite plugins complete the picture by offering a way to share between frameworks. Vite is also a great fit when paired with [Backend frameworks](./backend-integration.md) like [Ruby](https://vite-ruby.netlify.app/) and [Laravel](https://laravel.com/docs/10.x/vite). diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 1804b589ceb3ed..051ca18a7cd894 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -172,7 +172,7 @@ You will need to access the file with `http` protocol. The easiest way to achiev The hash key used to invalidate optimized dependencies depends on the package lock contents, the patches applied to dependencies, and the options in the Vite config file that affects the bundling of node modules. This means that Vite will detect when a dependency is overridden using a feature as [npm overrides](https://docs.npmjs.com/cli/v9/configuring-npm/package-json#overrides), and re-bundle your dependencies on the next server start. Vite won't invalidate the dependencies when you use a feature like [npm link](https://docs.npmjs.com/cli/v9/commands/npm-link). In case you link or unlink a dependency, you'll need to force re-optimization on the next server start by using `vite --force`. We recommend using overrides instead, which are supported now by every package manager (see also [pnpm overrides](https://pnpm.io/package_json#pnpmoverrides) and [yarn resolutions](https://yarnpkg.com/configuration/manifest/#resolutions)). -## Performance bottlenecks +## Performance Bottlenecks If you suffer any application performance bottlenecks resulting in slow load times, you can start the built-in Node.js inspector with your Vite dev server or when building your application to create the CPU profile: