Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-82429

npm bundle processor gets fooled when a main entry of a package.json starts with ./

    Details

      Description

      Trying to deploy an npm package whose "main" field of "package.json" points to a module starting with "./" makes the FlatNPMBundleProcessor think that there's no "main" entry and thus fails.

      An example of such package is chartjs-color-string@0.5.0.

      Steps to reproduce:

      1. Start portal
      2. Deploy attached JAR file
      3. Open http://localhost:8080/o/js_loader_modules in a browser
      4. Look for [chartjs-color-string@0.5.0": \{exactMatch: true] (without the surrounding [ and ])

      Expected results:

      • You should see the following result:

      Actual results:

      • You see this, which is incorrect:

       

      Notice how the "value" field changes in both screenshots.

       

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            ivan.zaera Ivan Zaera
            Participants of an Issue:
            Recent user:
            Csaba Turcsan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              2 years, 31 weeks, 6 days ago

                Packages

                Version Package
                7.0.0 DXP FP51
                7.0.0 DXP SP9
                7.0.X
                7.1.X
                Master