Set of dependencies for running webpack with TypeScript.
npm install -DE build-tools-webpack-typescript
In webpack.config.js
:
const { rules, extensions } = require('build-tools-webpack-typescript');
module.exports = {
module: {
rules
},
resolve: {
extensions
}
}
or combined with other rules/extensions:
const { rules: tsRules, extensions: tsExtensions } = require('build-tools-webpack-typescript');
module.exports = {
module: {
rules: [
...tsRules,
... // other loaders
]
},
resolve: {
extensions: [
...tsExtensions,
... // other extensios
]
}
}