Details

      Description

      Marcos Martins: just creating this LPS so I can send you a PR with the workaround for the moduleNameMapper issue you reported here:

      https://liferay.slack.com/archives/CNBG06JS3/p1585226190005800

      As we noted there, the import path starts with: "/js/components/..."

      The autogenerated moduleNameMapper has this config in it:

      https://gist.github.com/wincent/6cc3ece6cd2ded0f62aa79942eabd791#file-temp_jest-config-json-in-dynamic-data-mapping-form-web-json-L48

      So it basically appends "/js/components/..." etc to the module path which itself ends with "/js", causing a bad path to be yielded with a double "/js/js/" in it.

      Root cause is we have inconsistent module structure where some projects put their "main" entry point in "resources/js/" and others directly under "resources/". I'll try to provide a robust solution in liferay-npm-scripts, but for now the immediate workaround is to overwrite moduleNameMapper locally.

      I think we can discard the alternate fix of making all modules have the exact same structure — that would be too much churn (and risk) for small payoff.

      Will send you PR with workaround presently.

        Attachments

          Activity

            People

            Assignee:
            marcos.martins Marcos Martins
            Reporter:
            greg.hurrell Greg Hurrell (Inactive)
            Engineering Assignee:
            Greg Hurrell (Inactive)
            Recent user:
            Greg Hurrell (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Packages

                Version Package