Skip to content

[Question] Not working with "npm start" and "serve -s build" at same time #21

@omarali1991kurd

Description

@omarali1991kurd

Is it possible to use same code for both production (when using serve -s build) and also during development when using npm start?

I got this to work fine when using "serve -s build" for different productions sites. I can run the react-inject-env for each production site (hosted by k8s). However when I started the development (here I use docker-compose) the "env.js" file could be found since then not all files where packed together.

I use the standard command to create my project "npx create-react-app my-app". Any suggestion on how to set it up? I want to avoid to have different solution for production and development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions