1
1
---
2
2
title : インストール
3
- updated : 2019-02-11
3
+ updated : 2019-02-14
4
4
type : guide
5
5
order : 1
6
6
vue_version : 2.5.16
@@ -35,19 +35,19 @@ Vue を使用する場合は、ブラウザに [Vue Devtools](https://github.com
35
35
36
36
### CDN
37
37
38
- For prototyping or learning purposes, you can use the latest version with :
38
+ プロトタイピングや学習を目的とする場合は、以下のようにして最新バージョンを使うことができます :
39
39
40
40
``` html
41
41
<script src =" https://cdn.jsdelivr.net/npm/vue" ></script >
42
42
```
43
43
44
- For production, we recommend linking to a specific version number and build to avoid unexpected breakage from newer versions :
44
+ 本番環境では、新しいバージョンによる意図しない不具合を避けるため、特定のバージョン番号とビルド番号にリンクすることをお勧めします :
45
45
46
46
``` html
47
47
<script src =" https://cdn.jsdelivr.net/npm/vue@2.6.0/dist/vue.js" ></script >
48
48
```
49
49
50
- If you are using native ES Modules, there is also an ES Modules compatible build :
50
+ もしもネイティブの ES Modules を使っているなら、 ES Modules 互換のビルドもあります :
51
51
52
52
``` html
53
53
<script type =" module" >
@@ -83,7 +83,7 @@ $ npm install vue
83
83
84
84
[ NPM パッケージの ` dist/ ` ディレクトリ] ( https://cdn.jsdelivr.net/npm/vue/dist/ ) では Vue.js の多くのさまざまなビルドが見つかります。それらの違いの概要は以下の通りです:
85
85
86
- | | UMD | CommonJS | ES Module (for bundlers ) | ES Module (for browsers ) |
86
+ | | UMD | CommonJS | ES Module (バンドラ用 ) | ES Module (ブラウザ用 ) |
87
87
| --- | --- | --- | --- | --- |
88
88
| ** 完全** | vue.js | vue.common.js | vue.esm.js | vue.esm.browser.js |
89
89
| ** ランタイム限定** | vue.runtime.js | vue.runtime.common.js | vue.runtime.esm.js | - |
@@ -102,11 +102,11 @@ $ npm install vue
102
102
103
103
- ** [ CommonJS] ( http://wiki.commonjs.org/wiki/Modules/1.1 ) ** : CommonJS ビルドは [ browserify] ( http://browserify.org/ ) や [ webpack 1] ( https://webpack.github.io ) のような古いバンドラでの利用を意図しています。これらのバンドラ (` pkg.main ` ) のための既定のファイルはランタイム限定 CommonJS ビルド (` vue.runtime.common.js ` ) です。
104
104
105
- - ** [ ES Module] ( http://exploringjs.com/es6/ch_modules.html ) ** : starting in 2.6 Vue provides two ES Modules (ESM) builds :
105
+ - ** [ ES Module] ( http://exploringjs.com/es6/ch_modules.html ) ** : バージョン 2.6 から Vue は 2 種類の ES Modules (ESM) ビルドを提供します :
106
106
107
- - ESM for bundlers: intended for use with modern bundlers like [ webpack 2] ( https://webpack.js.org ) or [ Rollup] ( https://rollupjs.org/ ) . ESM format is designed to be statically analyzable so the bundlers can take advantage of that to perform "tree-shaking" and eliminate unused code from your final bundle. The default file for these bundlers (` pkg.module ` ) is the Runtime only ES Module build (` vue.runtime.esm.js ` ).
107
+ - バンドラ用 ESM: [ webpack 2] ( https://webpack.js.org ) や [ Rollup] ( https://rollupjs.org/ ) のようなモダンバンドラでの利用を想定しています。 ESM フォーマットは、バンドラが "tree-shaking" を実行して最終バンドルから未使用コードを除去しやすいように、静的解析できる設計になっています。これらのバンドラ (` pkg.module ` ) のための既定のファイルは、ランタイム限定 ES Module ビルド (` vue.runtime.esm.js ` ) です。
108
108
109
- - ESM for browsers (2.6+ only ): intended for direct imports in modern browsers via ` <script type="module"> ` .
109
+ - ブラウザ用 ESM (2.6 以降のみ ): モダンブラウザでの ` <script type="module"> ` による直接インポートを想定しています。
110
110
111
111
### ランタイム + コンパイラとランタイム限定の違い
112
112
0 commit comments