Skip to content
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.

Commit

Permalink
feat(webpack): Use fork-ts-checker-webpack-plugin (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
nklayman authored and nothingismagick committed Feb 22, 2019
1 parent 2ea10cc commit ede14e6
Show file tree
Hide file tree
Showing 3 changed files with 587 additions and 12 deletions.
6 changes: 5 additions & 1 deletion typescript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

module.exports = function (api, ctx) {
api.chainWebpack((chain, invoke) => {
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
chain.resolve
.extensions
.add('.ts')
Expand All @@ -16,7 +17,10 @@ module.exports = function (api, ctx) {
.use('typescript')
.loader('ts-loader')
.options({
appendTsSuffixTo: [/\.vue$/]
appendTsSuffixTo: [/\.vue$/],
// Type checking is handled by fork-ts-checker-webpack-plugin
transpileOnly: true
})
chain.plugin('ts-checker').use(ForkTsCheckerWebpackPlugin)
})
}
3 changes: 2 additions & 1 deletion typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@
"yarn": ">= 1.6.0"
},
"dependencies": {
"fork-ts-checker-webpack-plugin": "^0.5.2",
"ts-loader": "^5.3.3",
"typescript": "^3.3.3",
"vue-class-component": "^7.0.1",
"vue-property-decorator": "^7.3.0"
},
"devDependencies": {}
"devDependencies": {}
}
Loading

0 comments on commit ede14e6

Please sign in to comment.