eddyson-de / tapestry-react

Integration of Apache Tapestry and React
Apache License 2.0
17 stars 5 forks source link

Invalid babel preset error if stage 3 transformations enabled #109

Closed eduardbaitinger closed 7 years ago

eduardbaitinger commented 7 years ago

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.

jochenberger commented 7 years ago

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