5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 02:56:22 +00:00
panel/config/webpack/development.js
void c9d0fb87a4 actualizar dependencias de yarn y agregar un coso
que detecta dependencias ciruclares en el javascript
2021-02-12 22:17:58 +00:00

31 lines
930 B
JavaScript

process.env.NODE_ENV = process.env.NODE_ENV || 'development'
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const CircularDependencyPlugin = require('circular-dependency-plugin');
const path = require("path");
const environment = require('./environment')
environment.plugins.append(
"ForkTsCheckerWebpackPlugin",
new ForkTsCheckerWebpackPlugin({
typescript: {
configFile: path.resolve(__dirname, "../../tsconfig.json"),
},
// non-async so type checking will block compilation
async: false,
}),
);
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(),
}),
)
module.exports = environment.toWebpackConfig()