2019-08-30 20:47:31 +00:00
|
|
|
process.env.NODE_ENV = process.env.NODE_ENV || 'development'
|
|
|
|
|
2021-02-12 15:57:23 +00:00
|
|
|
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
|
2021-02-12 22:17:58 +00:00
|
|
|
const CircularDependencyPlugin = require('circular-dependency-plugin');
|
2021-02-12 15:57:23 +00:00
|
|
|
const path = require("path");
|
|
|
|
|
2019-08-30 20:47:31 +00:00
|
|
|
const environment = require('./environment')
|
|
|
|
|
2021-02-12 15:57:23 +00:00
|
|
|
environment.plugins.append(
|
|
|
|
"ForkTsCheckerWebpackPlugin",
|
|
|
|
new ForkTsCheckerWebpackPlugin({
|
|
|
|
typescript: {
|
|
|
|
configFile: path.resolve(__dirname, "../../tsconfig.json"),
|
|
|
|
},
|
|
|
|
// non-async so type checking will block compilation
|
|
|
|
async: false,
|
2021-02-12 22:17:58 +00:00
|
|
|
}),
|
2021-02-12 15:57:23 +00:00
|
|
|
);
|
2021-02-12 22:17:58 +00:00
|
|
|
environment.plugins.append(
|
|
|
|
"CircularDependencyPlugin",
|
|
|
|
new CircularDependencyPlugin({
|
|
|
|
exclude: /node_modules/,
|
|
|
|
failOnError: false,
|
|
|
|
// allow import cycles that include an asyncronous import,
|
|
|
|
// e.g. via import(/* webpackMode: "weak" */ './file.js')
|
|
|
|
allowAsyncCycles: false,
|
|
|
|
cwd: process.cwd(),
|
|
|
|
}),
|
|
|
|
)
|
2021-02-12 15:57:23 +00:00
|
|
|
|
2019-08-30 20:47:31 +00:00
|
|
|
module.exports = environment.toWebpackConfig()
|