From 5413f47f10e408ebbd6bee33764dbf4095f46090 Mon Sep 17 00:00:00 2001 From: Cozy Pierre Date: Wed, 20 Jul 2022 16:54:10 +0200 Subject: [PATCH] docs: explain how an App is consuming cozy-bar in dev --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index dfe037d6..10c2a67d 100644 --- a/README.md +++ b/README.md @@ -148,6 +148,15 @@ In order to add new features to the cozy-bar v7 while working on another cozy-ap `$ yarn start` // in the cozy-app +### How does it work? + +When Drive is building, the cozy-bar assets are defined dynamically if __STACK_ASSETS__ = true +[inside the browser file](https://github.com/cozy/cozy-drive/blob/master/src/drive/targets/browser/index.ejs#L27-L32) + +In [dev mode on webpack, __STACK_ASSETS__ = false](https://github.com/cozy/create-cozy-app/blob/532dc9848526d48b749a8fd4fecdce1c9a6880c2/packages/cozy-scripts/config/webpack.environment.dev.js#L27) + +[In that case, the cozy-bar is injected](https://github.com/cozy/create-cozy-app/blob/532dc9848526d48b749a8fd4fecdce1c9a6880c2/packages/cozy-scripts/config/webpack.environment.dev.js#L35-L57) + Contribute ----------