{ "id": "171237", "key": "TIMOB-25837", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2018-03-05T11:06:06.000+0000", "priority": { "name": "None", "id": "6" }, "labels": [ "cb-tooling" ], "versions": [ { "id": "19957", "description": "", "name": "Release 7.1.0", "archived": false, "released": true, "releaseDate": "2018-03-14" }, { "id": "20060", "description": "", "name": "Release 7.0.2", "archived": false, "released": true, "releaseDate": "2018-02-09" }, { "id": "20099", "name": "Release 7.2.0", "archived": false, "released": true, "releaseDate": "2018-06-14" } ], "issuelinks": [], "assignee": null, "updated": "2020-01-30T21:29:51.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "13103", "name": "CLI", "description": "Node-based command line interface" } ], "description": "h5.Description \r\n\r\nIf a babel config (via .babelrc or package.json) is defined in the Titanium project root then babel will pick this up and merge it with the one populated in the SDK. Personally I think that this is valuable, but has the opportunity to cause problems as seen in ALOY-1605. We can disable this by setting the {{babelrc}} option in babel-core to false like we do in Alloy\r\n\r\nThis occurs since 7.0.2.GA, but only occurs when building to device (minification enabled) in that SDK\r\n\r\nh5.Steps to reproduce\r\n\r\n1. Add a file named {{.babelrc}} in the root your Titanium project\r\n2. Add { \"plugins\": \\[ \"transform-react-jsx\" \\] \\} to the .babelrc\r\n3. Build a Titanium app\r\n\r\nh5.Actual\r\n\r\nBuild will fail with {{\\[ERROR\\] Unknown plugin \"transform-react-jsx\" specified in \"/Users/eharris/Documents/Appcelerator_Studio_Workspace/ticreateapp/.babelrc\" at 0, attempted to resolve relative to \"/Users/eharris/Documents/Appcelerator_Studio_Workspace/ticreateapp\"}} as babel-core will pick up the babel config\r\n\r\n\r\nh5.Expected\r\n\r\nNot sure, do we allow babel configs to be overidden? If not then the error shouldn't occurs, if so then this ticket is invalid", "attachment": [], "flagged": false, "summary": "CLI: Babel config in root of project is detected", "creator": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "subtasks": [], "reporter": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "environment": "Ti SDK: 7.1.0.v20180302141418, 7.2.0.v20180302144729, 7.0.2.GA", "comment": { "comments": [ { "id": "435184", "author": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "body": "cc [~cwilliams] [~emerriman] [~hknoechel] [~gmathews] What do you think, supporting this would totally make this even better, but I think allowing babel to merge the configs might cause the plugin ordering to be off meaning that the global-this custom plugin might not be run last and therefore breaking code like ALOY-1605. I think if we merge manually in node-titanium-sdk we can ensure global-this is placed last which I believe is where it needs to be", "updateAuthor": { "name": "eharris", "key": "eharris", "displayName": "Ewan Harris", "active": true, "timeZone": "Europe/Dublin" }, "created": "2018-03-05T11:16:25.000+0000", "updated": "2018-03-05T11:16:25.000+0000" } ], "maxResults": 1, "total": 1, "startAt": 0 } } }