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

[NGRM] - using addon-redux enforces dependency on @storybook in production #720

Closed
mirisb opened this issue Jan 4, 2022 · 3 comments · Fixed by #832 or #856
Closed

[NGRM] - using addon-redux enforces dependency on @storybook in production #720

mirisb opened this issue Jan 4, 2022 · 3 comments · Fixed by #832 or #856
Assignees
Labels
AspenTech Task owned by AspenTech bug Something isn't working maintenance

Comments

@mirisb
Copy link
Collaborator

mirisb commented Jan 4, 2022

addon-redux is a Storybook addon that helps when building stories using components that use redux state.
It should not be used in files which are part of the final package especially in production and on web applications

@ ./node_modules/addon-redux/dist/esm/index.js 8:0-57 8:0-57
@ ./node_modules/@webviz/subsurface-components/dist/components/DeckGLMap/redux/store.js

@anders-kiaer
Copy link
Collaborator

Thanks for the issue report @mirisb - and agree with you, it feels strange to have it in dependencies (being a storybook addon). We moved it from devDependencies to dependencies in #539 in order to solve #523, but I'm unsure why #523 appeared in the first place. @t0oF @hkfb Do you have any new insight into why #523 appeared?

@anders-kiaer anders-kiaer added bug Something isn't working AspenTech Task owned by AspenTech maintenance labels Jan 4, 2022
@w1nklr
Copy link
Collaborator

w1nklr commented Jan 4, 2022

#523 (ie. the dependency on addon-redux) was always there. We were the first ones to use subsurface-components as an npm dependency, which is why I filed the issue.

@ghost
Copy link

ghost commented Jan 4, 2022

BTW, I just created a PR #722 to remove test and storybook related files from the generated package. This PR does not fix the current issue though.

@hkfb hkfb self-assigned this Jan 6, 2022
hkfb pushed a commit to hkfb/webviz-subsurface-components that referenced this issue Jan 6, 2022
hkfb pushed a commit to hkfb/webviz-subsurface-components that referenced this issue Feb 2, 2022
@hkfb hkfb removed their assignment Feb 2, 2022
@shadab-skhan shadab-skhan self-assigned this Feb 17, 2022
shadab-skhan pushed a commit to shadab-skhan/webviz-subsurface-components that referenced this issue Feb 17, 2022
shadab-skhan added a commit that referenced this issue Feb 23, 2022
…book (#832)

* Moved addon-redux to devDependenies and resolved dependency on @storybook in production
Closes #720

* Used require for conditionally loading of module

* added package-lock

Co-authored-by: Shadab Khan <Shadab.Khan@Emerson.com>
Co-authored-by: Håvard Bjerke <hkfbjerke@gmail.com>
@shadab-skhan shadab-skhan changed the title using addon-redux enforces dependency on @storybook in production [NGRM] - using addon-redux enforces dependency on @storybook in production Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment