Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25837

CLI: Babel config in root of project is detected

    Details

    • Type: Bug
    • Status: Open
    • Priority: None
    • Resolution: Unresolved
    • Affects Version/s: Release 7.1.0, Release 7.0.2, Release 7.2.0
    • Fix Version/s: None
    • Component/s: CLI
    • Labels:
    • Environment:

      Ti SDK: 7.1.0.v20180302141418, 7.2.0.v20180302144729, 7.0.2.GA

      Description

      Description

      If 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

      This occurs since 7.0.2.GA, but only occurs when building to device (minification enabled) in that SDK

      Steps to reproduce

      1. Add a file named .babelrc in the root your Titanium project
      2. Add { "plugins": [ "transform-react-jsx" ] } to the .babelrc
      3. Build a Titanium app

      Actual

      Build 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

      Expected

      Not sure, do we allow babel configs to be overidden? If not then the error shouldn't occurs, if so then this ticket is invalid

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              eharris Ewan Harris
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6230
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration