Closed arturi closed 4 years ago
@kvz @goto-bus-stop
I think a good generic solution is to use the .babelrc
if available, or a default config if not. (like next.js) That's also more explicit than merging configs with one hidden away in lanyon.
It's fairly simple to do with find-babel-config: https://github.com/extplug/extplug-cli/blob/d10c866d65e11ac9a402d0205c55a430263ef7b8/src/build.js#L43-L46 https://github.com/extplug/extplug-cli/blob/d10c866d65e11ac9a402d0205c55a430263ef7b8/src/build.js#L77
I think we can surely
enable it here
as it's good to have for all the sites that currently use Lanyon. It's a good default imho so to speak.
That being said, something more in the way of configuration will allow people to make their own choices, which probably is probably nice (but since I regard optimizing Lanyon for non-transloadit use a low prio for now, i'd either be happy to accept a PR for that, or do it at some later point in time, and just add the transform right here in Lanyon)
Sent a PR: #13.
That PR was merged
For the Transloadit website, we have an object-assign transform in .babelrc, but it is ignored/overriden by Lanyon. Should we just enable it here or are there other solutions?