Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@elderjs/plugin-images - Custom config props not replacing default props properly #31

Closed
meigo opened this issue Oct 2, 2020 · 3 comments

Comments

@meigo
Copy link
Contributor

meigo commented Oct 2, 2020

Default config array props

widths: [1280, 992, 768, 576, 400, 350, 200], 
scales: [1, 2],

are not replaced with custom values from elder.config.js

widths: [1000, 750, 500], 
scales: [1],

but updated resulting config values like this

widths: [1000, 750, 500, 576, 400, 350, 200], 
scales: [1, 2],
@nickreese
Copy link
Contributor

nickreese commented Oct 2, 2020

@meigo this will be an issue with lodash’s defaultsDeep.

We’ll need to remove the defaults and if the array received by the init function is empty then we populate a default.

I’m slammed for the next few days but will try and bundle these together. If you wanted to try and pull together a PR I’d gladly code review and merge it.

The markdown plugin had a similar issue.

@meigo
Copy link
Contributor Author

meigo commented Oct 3, 2020

@nickreese
Copy link
Contributor

@meigo thank you for this. Will push a release today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants