Add tslib to TS compiler

- using tslib reduces bundle sizes
- add compiler option for easier default imports of CJS modules
- remove double entry of fork-ts-checker-plugin
- speed up hot reload by using exprimental ts-loader API
This commit is contained in:
David Kaltschmidt
2018-07-25 16:16:33 +02:00
parent 7e773e2d5e
commit 84e431d377
4 changed files with 65 additions and 42 deletions

View File

@@ -20,6 +20,7 @@ module.exports = merge(common, {
path: path.resolve(__dirname, '../../public/build'),
filename: '[name].[hash].js',
publicPath: "/public/build/",
pathinfo: false,
},
resolve: {
@@ -37,6 +38,12 @@ module.exports = merge(common, {
}
},
optimization: {
removeAvailableModules: false,
removeEmptyChunks: false,
splitChunks: false,
},
module: {
rules: [
{
@@ -56,7 +63,8 @@ module.exports = merge(common, {
{
loader: 'ts-loader',
options: {
transpileOnly: true
transpileOnly: true,
experimentalWatchApi: true
},
}],
},