How the __tests__ directories can be ignored while running yarn build in production mode.
I have tried .nuxtignore but this did not work. any idea? Thank you
28 Replies
can you tell me what integration you use, so I can give you exact answer
Magento2 Integration for Vue Storefront 2
hi @mirza5339 π ,
please try add an ignore property in nuxt.config.js
Let me know if that does the trick.
ah, you can put a minus
-
at the front of the filename and it will be ignored.
what does your entry in the .nuxtignore look like?
next idea:
![No description](https://cdn.answeroverflow.com/1152206620676325446/test.png)
ah I see what i just sent wont work based on the path of the test
top is ignore rule from nuxt.config.js and at the bottom is example path
The issue is that these test paths generate errors while running yarn build in production mode because devDependencies are not loaded in production mode
Is this ignore rule correct?
The only part that might be incorrect is the dot . here:
![No description](https://cdn.answeroverflow.com/1152208710366670858/image.png)
can you try it without that dot
I have tried without dot
it does not even consider the ignore config
I'm not sure at the moment. π€ Let me mess with it a bit and get back to you. If you figure it out in the meantime please let me know.
ok thank you
I'm not getting any error when building. Can you tell me step by step how to reproduce the error?
@mirza5339
1. In you .env file change VSF_NUXT_APP_ENV=production
2. Do you have a test folder path as shown in this attached screenshot
![No description](https://cdn.answeroverflow.com/1152213696299417670/test2.png)
3. run command yarn build