Ignoring __test__ folder during the build process
Unanswered
Pteromalid wasp posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Pteromalid waspOP
Hey guys I am trying to ignore my test files during the build process but unable to progress,
I have a github workflow set to run tests so that the build process is free of tests,
It would be great if someone can help me with this also would love to know if it's a good idea or not
I have a github workflow set to run tests so that the build process is free of tests,
It would be great if someone can help me with this also would love to know if it's a good idea or not
5 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Pteromalid waspOP
For ref:
this is what my next.config.js looks like
this is what my next.config.js looks like
webpack: (config, { isServer }) => {
if (!isServer) {
// Ignore the "__test__" folder
config.module.rules.push({
test: /^__test__|\.test\.ts$/,
loader: 'ignore-loader',
});
}
return config;
},
![Avatar](https://cdn.discordapp.com/avatars/390564217729581056/2b2619731b1d1c6a5f8da9c6c75d3fcd.webp?size=256)
maxswjeon
Use Typescript RootDir and use src folder? Might help
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Pteromalid waspOP
Tried excluding the test files in ts conifg but it doesn't seem to be working