Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1749] Cannot use babel config to ignore files from babel

GitHub Issuen/a
TypeBug
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2021-09-17T14:54:38.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.16.4
Componentsn/a
Labelsn/a
ReporterEwan Harris
AssigneeEwan Harris
Created2021-09-06T10:12:37.000+0000
Updated2021-11-16T18:17:33.000+0000

Description

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

Comments

No comments

JSON Source