I have a folder with some mock data in "src/api/mock" folder which contains some ts and JSON files. I want Webpack to exclude them when it builds for production. I tried using the below rule but its not working. Any suggestions?
module: {
rules: [
{
test: /\.(ts|json)$/i,
exclude: ['/src/api/mock/'],
},
],
},