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

Direflow re-build on the fly to file #237

Open
lukasz-devkick opened this issue Jul 21, 2021 · 1 comment
Open

Direflow re-build on the fly to file #237

lukasz-devkick opened this issue Jul 21, 2021 · 1 comment
Labels
Enhancement New feature or request

Comments

@lukasz-devkick
Copy link

We use direflow in a very specific way in our project. Currently we are during migration legacy code to new react code. We use a strangler pattern, so currently, the new code is a dependency to the old repository.

I opaqued it both in the docker and docker-compose containers, which syncs direflowBundle.js built on watcher. Because legacy application loads the direflowBundle I can't use provided developement server.

Is it possible to run the server with auto-rebuild to direflowBundle.js instead of syncing with the browser?

@lukasz-devkick lukasz-devkick added the Enhancement New feature or request label Jul 21, 2021
@bhavikup
Copy link

Hi @lduraj90 ,

One thing you can try is to tell the webpack dev server to write the file to disk instead of the default of keeping it in memory.

In your config-overrides.js:

{
  devServer: (configFunction) => {
      return (proxy, allowedHost) => {
          const config = configFunction(proxy, allowedHost);
	  config.writeToDisk = true;
          return config;
     }
  }
  ...
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants