Details
-
Task
-
Status: Closed
-
Minor
-
Resolution: Completed
-
None
-
None
-
None
-
S03E21 - Vienna, S03E22 - Tokyo, S03E23 - Olinda, S03E24 - Wuhan
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:
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.