Skip to content
This repository has been archived by the owner on Oct 28, 2023. It is now read-only.

Preset doesn't work if craco config is a function #6

Open
sradevski opened this issue May 6, 2021 · 3 comments
Open

Preset doesn't work if craco config is a function #6

sradevski opened this issue May 6, 2021 · 3 comments
Labels
fix Something isn't working

Comments

@sradevski
Copy link

It is possible for the default export from craco config to be a function, so you can do some calculations based on envvars, for example, but currently this preset will fail with "cracoConfig needs to be an object"

I think after https://github.com/artisanofcode/storybook-preset-craco/blob/fedf54a5f2b4c68635b67433f10bb79be2628289/index.js#L57 you can just add a check if it is a function, and if it is just run it.

@sradevski sradevski added the fix Something isn't working label May 6, 2021
@danielknell
Copy link
Contributor

I will try to look at this some time next week unless someone wants to PR it first.

@ArtemFokin
Copy link

Still not working

@DoWhileGeek
Copy link

I'm getting bit by this as well

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fix Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants