Ignore Files in Plugin build process

My company decided not to keep the unit test in the test folder, but right next to the typescript files. In the dev-app these files also appear, which is not really planned. Is there a way to prevent this?

what do you exactly mean by ignoring? not building? not copying?

in general you could create perhaps an additional tsconfig.prod.json which ignores all test files via a grep and use it instead of the original one.

if you could share a minimal github repo of a sample plugin and explaining what you’d like to achieve we can certainly help you better

In general, you won’t end up importing things from your test files to your source files. Hence those files should not end up in your production bundle, if I am understanding it correctly.

I set the *.spec.ts files to ignore in tsconfig.json, but they were still copied to the output directory when the build command was executed.

At the end all tests moved back to the test folder.

ok copying files is something different, so you mean the npm build command. can you share a minimal repro, I guess it should be doable but hard to guess without seeing some example

Here is a small repo and a screenshot:

image

i’m not at the pc but try modifying this array with a negated glob to exclude *.spec.ts files au-tests/aurelia.json at e907f89fa322f893fa14d9c15152d08fd34662d9 · Marcel-B/au-tests · GitHub