eddyson-de / tapestry-react

Integration of Apache Tapestry and React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid babel preset error if stage 3 transformations enabled

eduardbaitinger opened this issue · comments

If I enable the babel stage 3 transformations ENABLE_STAGE_3_TRANSFORMATIONS, the transformation throws the following error:

Caused by: java.lang.RuntimeException: Error: Invalid preset specified in Babel options: "stage3"
	at de.eddyson.tapestry.react.services.impl.NodeBabelCompiler.compile(NodeBabelCompiler.java:79)
	at $BabelCompiler_17eea7322f01a9.compile(Unknown Source)
	at de.eddyson.tapestry.react.services.impl.BabelResourceTransformer.transform(BabelResourceTransformer.java:69)
	at org.apache.tapestry5.internal.webresources.ResourceTransformerFactoryImpl$1$1.perform(ResourceTransformerFactoryImpl.java:143)
	at org.apache.tapestry5.internal.webresources.ResourceTransformerFactoryImpl$1$1.perform(ResourceTransformerFactoryImpl.java:139)
	at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.perform(OperationTrackerImpl.java:110)
	... 92 more

The reason is a typo in preset name in babel-compiler-wrapper.js. It has to be stage-3 and not stage3.

Since you know how to fix it, would you mind creating a PR instead?