Closed rahulahoop closed 4 years ago
Hi @rahulahoop
The problem is that the babel-loader you are using is calling Babel 6 under the hood (see https://github.com/liferay/liferay-js-toolkit/blob/v2.17.0/packages/liferay-npm-bundler-loader-babel-loader/package.json#L12 ) and the presets and plugins under @babel/....
are designed for Babel 7+.
The solution would be finding the equivalent plugin for Babel 6 or creating a babel-loader that calls Babel 7.
We have plans to upgrade to Babel 7, but we haven't committed to any timeframe yet...
I have a mixed java and javascript portlet that i want to deploy to my liferay instance.
here below is my .npmbundlerrc
and this is the error im getting because the babel loader is looking for api variable from the babel config. Perhaps api keyword or pointing to a babel.config.json needs to be added