[ALOY-1749] Cannot use babel config to ignore files from babel
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2021-09-17T14:54:38.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.16.4 |
Components | n/a |
Labels | n/a |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2021-09-06T10:12:37.000+0000 |
Updated | 2021-11-16T18:17:33.000+0000 |
Description
Description
When attempting to use the babel config to ignore files, it errors withError: 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. Runnpm 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 occursExpected
No errorComments
No comments