You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You don't need to install anything on your machine to try out Vue SFCs - there are many online playgrounds that allow you to do so right in the browser:
[Vite](https://vitejs.dev/)is a lightweight and fast build tool with first-class Vue SFC support. It is created by Evan You, who is also the author of Vue itself! To get started with Vite + Vue, simply run:
22
+
[Vite](https://vitejs.dev/)はファーストクラスの Vue SFC サポートをする軽量で高速なビルドツールです。Vue 自体の作成者でもある Evan You によって作成されました! Vite + Vue を使い始めるには、単に次のコマンドを実行するだけです:
23
23
24
24
```sh
25
25
npm init vite@latest
26
26
```
27
27
28
-
Then select the Vue template and follow the instructions.
28
+
その後、Vue テンプレートを選択して、指示に従います。
29
29
30
-
-To learn more about Vite, check out the [Vite docs](https://vitejs.dev/guide/).
31
-
-To configure Vue-specific behavior in a Vite project, for example passing options to the Vue compiler, check out the docs for [@vitejs/plugin-vue](https://github.com/vitejs/vite/tree/main/packages/plugin-vue#readme).
30
+
- Vite についての詳細は [Vite ドキュメント(日本語)](https://ja.vitejs.dev/guide/) を確認してください
We recommend starting new projects with Vite as it offers significantly better development experience in terms of dev server startup and HMR update performance ([details](https://vitejs.dev/guide/why.html)). Only go with Vue CLI if you rely on specific webpack features (e.g. Module Federation).
If you are a [Rollup](https://rollupjs.org/)user, you can safely adopt Vite as it uses Rollup for production builds and supports a Rollup-compatible plugin system. [Even Rollup's maintainer recommends Vite as THE web development wrapper for Rollup](https://twitter.com/lukastaegert/status/1412119729431584774).
The recommended IDE setup is [VSCode](https://code.visualstudio.com/)+ the [Volar](https://github.com/johnsoncodehk/volar)extension. Volar provides syntax highlighting and advanced IntelliSense for template expressions, component props and even slots validation. We strongly recommend this setup if you want to get the best possible experience with Vue SFCs, especially if you are also using TypeScript.
[WebStorm](https://www.jetbrains.com/webstorm/)also provides decent support for Vue SFCs. However, do note as of now its support for `<script setup>`is still [in progress](https://youtrack.jetbrains.com/issue/WEB-49000).
Most other editors have community-created syntax highlighting support for Vue, but lack the same level of code IntelliSense. In the long run, we do hope we can extend the range of editor support by leveraging the [Language Service Protocol](https://microsoft.github.io/language-server-protocol/)as Volar's core logic is implemented as a standard language server.
58
+
他のほとんどのエディタには、コミュニティが作成した Vue のシンタックスハイライトのサポートがありますが、同じレベルのコードインテリセンスはありません。長期的には、Volar のコアロジックが標準言語サーバとして実装されているため、[Language Service Protocol](https://microsoft.github.io/language-server-protocol/)を活用することでエディタのサポート範囲を広げることができればと考えています。
59
59
60
-
## Testing Support
60
+
## テストサポート
61
61
62
-
-If using Vite, we recommend [Cypress](https://www.cypress.io/)as the test runner for both unit and e2e tests. Unit tests for Vue SFCs can be done with the [Cypress Component Test Runner](https://www.cypress.io/blog/2021/04/06/introducing-the-cypress-component-test-runner/).
62
+
- Vite を使用する場合は、[Cypress](https://www.cypress.io/)をユニットテストと E2E テストの両方のテストランナーとしておすすめします。Vue SFC のユニットテストは [Cypress Component Test Runner](https://www.cypress.io/blog/2021/04/06/introducing-the-cypress-component-test-runner/) で実行できます。
63
63
64
-
- Vue CLI comes with [Jest](https://jestjs.io/)and[Mocha](https://mochajs.org/)integrations.
-If you are manually configuring Jest to work with Vue SFCs, check out [vue-jest](https://github.com/vuejs/vue-jest)which is the official Jest transform for Vue SFCs.
66
+
-Vue SFC で動作するように Jest を手動で設定する場合は、Vue SFC 向け公式 Jest トランスフォームの [vue-jest](https://github.com/vuejs/vue-jest)を確認してください。
67
67
68
-
## Custom Blocks Integration
68
+
## カスタムブロックの統合
69
69
70
-
Custom blocks are compiled into imports to the same Vue file with different request queries. It is up to the underlying build tool to handle these import requests.
-If using Vite, a custom Vite plugin should be used to transform matched custom blocks into executable JavaScript.[[Example](https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-transforming-custom-blocks)]
72
+
- Vite を使用する場合、カスタム Vite プラグインを使用して、一致したカスタムブロックを実行可能な JavaScript に変換する必要があります。[[例](https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-transforming-custom-blocks)]
73
73
74
-
-If using Vue CLI or plain webpack, a webpack loader should be configured to transform the matched blocks.[[Example](https://vue-loader.vuejs.org/guide/custom-blocks.html#custom-blocks)]
This package is part of the Vue core monorepo and is always published with the same version as the main `vue`package. Typically, it will be listed as a peer dependency of `vue`in a project. To ensure correct behavior, its version should always be kept in-sync with `vue`- i.e. whenever you upgrade the version of `vue`, you should also upgrade `@vue/compiler-sfc`to match it.
The package itself provides lower-level utilities for processing Vue SFCs and is only meant for tooling authors that need to support Vue SFCs in custom tools.
Official plugin that provides Vue SFC support in Vite.
90
+
Vite で Vue SFC サポートを提供する公式プラグインです。
91
91
92
92
### `vue-loader`
93
93
94
-
-[Docs](https://vue-loader.vuejs.org/)
94
+
-[ドキュメント](https://vue-loader.vuejs.org/)
95
95
96
-
The official loader that provides Vue SFC support in webpack. If you are using Vue CLI, also see [docs on modifying `vue-loader`options in Vue CLI](https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader).
0 commit comments