2019-06-19 14:40:52 +00:00
|
|
|
/* eslint-disable */
|
|
|
|
const CheckerPlugin = require("fork-ts-checker-webpack-plugin");
|
|
|
|
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
|
|
|
|
2019-08-09 11:14:35 +00:00
|
|
|
module.exports = ({ config }) => {
|
2019-06-19 14:40:52 +00:00
|
|
|
config.module.rules.push({
|
|
|
|
test: /\.tsx?$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
loader: "ts-loader",
|
|
|
|
options: {
|
|
|
|
experimentalWatchApi: true,
|
|
|
|
transpileOnly: true
|
|
|
|
}
|
|
|
|
});
|
|
|
|
config.optimization.removeAvailableModules = false;
|
|
|
|
config.optimization.removeEmptyChunks = false;
|
|
|
|
config.optimization.splitChunks = false;
|
|
|
|
config.resolve.extensions.push(".ts", ".tsx");
|
|
|
|
config.resolve.plugins = [
|
|
|
|
new TsconfigPathsPlugin({
|
|
|
|
configFile: "./tsconfig.json"
|
|
|
|
})
|
|
|
|
];
|
|
|
|
config.plugins.push(new CheckerPlugin());
|
|
|
|
return config;
|
|
|
|
};
|