Skip to content

Commit

Permalink
fix(typescript,babel): tests path for babel and typescript plugins (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
kvpt authored and yyx990803 committed Apr 25, 2018
1 parent c648301 commit b285b0b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-babel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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.

By default, `babel-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`:
By default, `babel-loader` is only applied to files inside `src` and `tests` directories. If you wish to explicitly transpile a dependency module, you will need to configure webpack in `vue.config.js`:

``` js
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-babel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = (api, options) => {
.test(/\.jsx?$/)
.include
.add(api.resolve('src'))
.add(api.resolve('test'))
.add(api.resolve('tests'))
.end()
.use('cache-loader')
.loader('cache-loader')
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ TypeScript can be configured via `tsconfig.json`.

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.

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`:
By default, `ts-loader` is only applied to files inside `src` and `tests` directories. If you wish to explicitly transpile a dependency module, you will need to configure webpack in `vue.config.js`:

``` js
module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = (api, {
.test(/\.tsx?$/)
.include
.add(api.resolve('src'))
.add(api.resolve('test'))
.add(api.resolve('tests'))
.end()

const vueLoader = config.module
Expand Down

0 comments on commit b285b0b

Please sign in to comment.