Description
When attempting to use the babel config to ignore files, it errors with
Error: Configuration contains string/RegExp pattern, but no filename was passed to Babel
.
We should pass the filename to babel so that we can support users doing this, it might be slightly tricky as to get the source filename we need to look it up in the
data
variable in
generateCodeAndSourceMap
but if we fallback to using the
target.filename
property (i.e where it will be written to) I think we should avoid any errrors.
Steps to reproduce
1. Create an alloy project
2. Run
npm init -y && npm i esquery
3. Create a babel.config.json file with the below contents
{
"ignore": [
"node_modules/esquery/**"
]
}
4. Run
alloy compile --config platform=ios
Actual
Above error occurs
Expected
No error
No comments