mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
const isCoverage = process.env.COVERAGE === "true";
|
|
const babelPlugins = isCoverage ? ["babel-plugin-istanbul"] : [];
|
|
const cracoPlugins = isCoverage
|
|
? [
|
|
{
|
|
plugin: require("craco-alias"),
|
|
options: {
|
|
source: "tsconfig",
|
|
baseUrl: "./src",
|
|
tsConfigPath: "./tsconfig.aliases.json",
|
|
},
|
|
},
|
|
]
|
|
: [
|
|
{
|
|
plugin: require("craco-alias"),
|
|
options: {
|
|
source: "tsconfig",
|
|
baseUrl: "./src",
|
|
tsConfigPath: "./tsconfig.aliases.json",
|
|
},
|
|
},
|
|
{
|
|
plugin: require("craco-esbuild"),
|
|
options: {
|
|
enableSvgr: true,
|
|
esbuildMinimizerOptions: {
|
|
target: "es2015",
|
|
css: true,
|
|
minify: true,
|
|
},
|
|
skipEsbuildJest: true,
|
|
},
|
|
},
|
|
];
|
|
|
|
module.exports = {
|
|
babel: {
|
|
plugins: babelPlugins,
|
|
},
|
|
plugins: cracoPlugins,
|
|
};
|