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

DEV storybook docker build is broken #324

Closed
MrOrz opened this issue Aug 30, 2020 · 1 comment
Closed

DEV storybook docker build is broken #324

MrOrz opened this issue Aug 30, 2020 · 1 comment

Comments

@MrOrz
Copy link
Member

MrOrz commented Aug 30, 2020

See:
https://dev.cofacts.org/storybook/index.html?path=/story/*

Root cause

Proposed fix

There are multiple ways to fix:

  1. Copy .env.sample to .env in Dockerfile before build-storybook
  • Pros: easy to achieve
  • Cons: due to how storybook handles process.env and process.env.XXX, this may cause weird inconsistency in the two DefinePlugin.
    • Result webpack config (using --debug-webpack flag):

截圖 2020-08-30 下午5 35 04

2. Write `LOCALE` to `.env` file in Dockerfile before `build-storybook` - Pros: contents of both `process.env` and `process.env.XXX` will be consistent, since they are all reading from .env file - Cons: we must add manually for each env vars to add to storybook build
@MrOrz
Copy link
Member Author

MrOrz commented May 27, 2022

Resolved in #484

@MrOrz MrOrz closed this as completed May 27, 2022
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

1 participant