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
Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-babel/README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
> babel plugin for vue-cli
4
4
5
-
## Transpilation
5
+
## Configuration
6
6
7
7
Uses Babel 7 + `babel-loader` + [@vue/babel-preset-app](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/babel-preset-app) by default, but can be configured via `.babelrc` to use any other Babel presets or plugins.
8
8
@@ -19,10 +19,6 @@ module.exports = {
19
19
}
20
20
```
21
21
22
-
## Injected Config Rules
23
-
24
-
-`config.rule('js')`
25
-
26
22
## Caching
27
23
28
24
[cache-loader](https://github.com/webpack-contrib/cache-loader) is enabled by default and cache is stored in `<projectRoot>/node_modules/.cache/cache-loader`.
Copy file name to clipboardExpand all lines: packages/@vue/cli-plugin-e2e-cypress/README.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,32 +8,32 @@ Cypress offers a rich interactive interface for running E2E tests, but currently
8
8
9
9
## Injected Commands
10
10
11
-
### `vue-cli-service e2e`
11
+
-**`vue-cli-service e2e`**
12
12
13
-
run e2e tests headlessly with `cypress run`.
13
+
run e2e tests headlessly with `cypress run`.
14
14
15
-
Options:
15
+
Options:
16
16
17
-
```
18
-
--url run e2e tests against given url instead of auto-starting dev server
19
-
-s, --spec runs a specific spec file. defaults to "all"
20
-
```
17
+
```
18
+
--url run e2e tests against given url instead of auto-starting dev server
19
+
-s, --spec runs a specific spec file. defaults to "all"
20
+
```
21
21
22
-
Additionally, [all Cypress CLI options for `cypress run` are also supported](https://docs.cypress.io/guides/guides/command-line.html#cypress-run).
22
+
Additionally, [all Cypress CLI options for `cypress run` are also supported](https://docs.cypress.io/guides/guides/command-line.html#cypress-run).
23
23
24
-
### `vue-cli-service e2e:open`
24
+
-**`vue-cli-service e2e:open`**
25
25
26
-
run e2e tests in interactive mode with `cypress open`.
26
+
run e2e tests in interactive mode with `cypress open`.
27
27
28
-
Options:
28
+
Options:
29
29
30
-
```
31
-
--url run e2e tests against given url instead of auto-starting dev server
32
-
```
30
+
```
31
+
--url run e2e tests against given url instead of auto-starting dev server
32
+
```
33
33
34
-
Additionally, [all Cypress CLI options for `cypress open` are also supported](https://docs.cypress.io/guides/guides/command-line.html#cypress-open).
34
+
Additionally, [all Cypress CLI options for `cypress open` are also supported](https://docs.cypress.io/guides/guides/command-line.html#cypress-open).
35
35
36
-
Both commands automatically starts a server in production mode to run the e2e tests against. If you want to run the tests multiple times without having to restart the server every time, you can start the server with `vue-cli-service serve --mode production` in one terminal, and then run e2e tests against that server using the `--url` option.
36
+
Both commands automatically starts a server in production mode to run the e2e tests against. If you want to run the tests multiple times without having to restart the server every time, you can start the server with `vue-cli-service serve --mode production` in one terminal, and then run e2e tests against that server using the `--url` option.
Uses TypeScript + `ts-loader` + [fork-ts-checker-webpack-plugin](https://github.com/Realytics/fork-ts-checker-webpack-plugin) for faster off-thread type checking.
6
+
7
+
## Configuration
8
+
9
+
TypeScript can be configured via `tsconfig.json`.
10
+
11
+
This plugin can be used alongside `@vue/cli-plugin-babel`. When used with Babel, this plugin will output ES2015 and delegate the rest to Babel for auto polyfill based on browser targets.
12
+
13
+
By default, `ts-loader` is only applied to files inside `src` and `test` directories. If you wish to explicitly transpile a dependency module, you will need to configure webpack in `vue.config.js`:
14
+
15
+
```js
16
+
module.exports= {
17
+
chainWebpack:config=> {
18
+
config
19
+
.rule('ts')
20
+
.include
21
+
.add(/module-to-transpile/)
22
+
}
23
+
}
24
+
```
25
+
26
+
## Injected Commands
27
+
28
+
If opted to use [TSLint](https://palantir.github.io/tslint/) during project creation, `vue-cli-service lint` will be injected.
29
+
30
+
## Caching
31
+
32
+
[cache-loader](https://github.com/webpack-contrib/cache-loader) is enabled by default and cache is stored in `<projectRoot>/node_modules/.cache/cache-loader`.
33
+
34
+
## Parallelization
35
+
36
+
[thread-loader](https://github.com/webpack-contrib/thread-loader) is enabled by default when the machine has more than 1 CPU cores. This can be turned off by setting `parallel: false` in `vue.config.js`.
37
+
38
+
## Installing in an Already Created Project
39
+
40
+
```sh
41
+
npm install -D @vue/cli-plugin-typescript
42
+
vue invoke typescript
43
+
```
44
+
45
+
## Injected webpack-chain Rules
46
+
47
+
-`config.rule('ts')`
48
+
-`config.rule('ts').use('ts-loader')`
49
+
-`config.rule('ts').use('babel-loader')` (when used alongside `@vue/cli-plugin-babel`)
0 commit comments