You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.
I want to set the babel.only option without overwriting the remaining babel defaults. After looking through the source code, I found the only way to set babel.only was to copy the defaults and pass those through too.
server.engine('jsx',expressReact.createEngine({babel: {// glob includes all view directories in app, plus helper views like layoutonly: `${__dirname}/**/*.jsx`,presets: ['react',['env',{targets: {node: 'current'}}]]}}));
Would you be open to a pull request to add an extraPaths option? It would essentially change this line
IIRC this should already work if using multiple views (since #109). options.settings.views is coming from express and might be an array. Or at least that used to be true. I think rather than thread more options through we should figure out why options.settings.views doesn't already contain the path you want. Would you be able to help work that out? If we need to pass more paths through in options, so be it but would be nice to avoid if possible.
My files are grouped by domain instead of type (db access, routes, views for users are all together for instance). Each router sets a separate views directory (routes.set('views', path.join(__dirname, 'views'));), which is not know to the main app. The main app sets up the view engine:
I want to set the
babel.only
option without overwriting the remaining babel defaults. After looking through the source code, I found the only way to setbabel.only
was to copy the defaults and pass those through too.Would you be open to a pull request to add an
extraPaths
option? It would essentially change this lineto
This way I won't have to copy all the babel options just to set a custom/expanded
babel.only
.The text was updated successfully, but these errors were encountered: