Closed max8hine closed 6 years ago
The babel transform we do at runtime only happens for the views directory (https://github.com/max8hine/expressApp/blob/master/app.js#L18). Anything outside of that will need to be pre-transformed (eg npm dependencies). If you want our transform running on other code it will need to be in the views dir.
Hooray, it works. It was my fault b/c the documents explained it clearly.
My code run into
SyntaxErro: Unexpected Toeken <
when there is a parent component.I just did really simple example Default.jsx which wraps Index.jsx and couldn't fund out which part goes wrong.
-- Env --
react@16.0.0
(under Project's peerDependency)react-dom@16.0.0
(under Project's peerDependency) (React@16.2.0
got same issue)If parent Component only returns Javascript, not HTML, works fine. If without require parent component, works fine.
Github: https://github.com/max8hine/expressApp/tree/master/templates