need side-effects for polyfills

This commit is contained in:
Bruno Windels 2021-06-24 16:55:22 +02:00
parent e4a1c99615
commit 28c5b0b80e

View file

@ -47,7 +47,17 @@ const __dirname = dirname(__filename);
const projectDir = path.join(__dirname, "../"); const projectDir = path.join(__dirname, "../");
const cssSrcDir = path.join(projectDir, "src/platform/web/ui/css/"); const cssSrcDir = path.join(projectDir, "src/platform/web/ui/css/");
const srcDir = path.join(projectDir, "src/"); const srcDir = path.join(projectDir, "src/");
const isPathInSrcDir = path => path.startsWith(srcDir);
const allowSideEffectsTreeShakeDirs = [
path.join(projectDir, "node_modules/mdn-polyfills/"),
path.join(projectDir, "node_modules/core-js/"),
path.join(projectDir, "node_modules/text-encoding/"),
srcDir,
];
const isPathInSrcDir = path => {
return allowSideEffectsTreeShakeDirs.some(p => path.startsWith(p));
};
const parameters = new commander.Command(); const parameters = new commander.Command();
parameters parameters