-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with AVA tests in separate processes #41
Comments
I can't get the idea of why But as we talk not about As a variant use some magic env variable like So you could run test as
Or allow
|
Something like that? #42 It wasn't clear to me how to add specific tests for it, without duplicating a lot of testing structure. I could add a section to the readme too, similar to the Caching Issues https://github.com/istarkov/babel-plugin-webpack-loaders#caching-issues section you have already? |
It's easy to test, just add additional test config and check that path to config is resolved with your variable, |
Fixed and closed via: #42 Ty help @istarkov 🎉 |
This will soon be fixed in AVA core and the workaround will not be needed anymore. We decided to reverse the decision to make CWD be the test file and instead it will be the directory of your package.json. See: avajs/ava#32 We could use some help with avajs/ava-codemods#19 so we can get the change into a release. |
I think this issue has already been noted here #4 (comment) but thought it would be worth making a dedicated issue, since it looks like no solution has been found?
The ava test runner runs each file under test in a new process, so I think this has the effect of adjusting the
pwd
to the folder of the current file and breaking this plugins ability to find the webpack config.So a babel config that looks like,
breaks with an error,
If I change the config to the below it works perfectly, but obviously the absolute filepath is no good on a shared project ...
Any body got any ideas? I would be happy to try and prepare a PR ... but not sure what approach to take ...
The text was updated successfully, but these errors were encountered: