kvz / lanyon

Deprecated
MIT License
35 stars 6 forks source link

Custom .babelrc #12

Closed arturi closed 4 years ago

arturi commented 7 years ago

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?

arturi commented 7 years ago

@kvz @goto-bus-stop

goto-bus-stop commented 7 years ago

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

kvz commented 7 years ago

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)

arturi commented 7 years ago

Sent a PR: #13.

kvz commented 4 years ago

That PR was merged