From b6c87d95d38fdf394f23bf6b390493a8a13208d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rio=20Ant=C3=B4nio=20do=20Amaral=20Rodeghiero?= Date: Thu, 5 Nov 2020 08:56:51 -0300 Subject: [PATCH] [readme][s]: update reamde about how to use css chunk if you are importing a component --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2e59303..0134673 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,20 @@ It would: Next, you need to update the template to include correct bundles. In `/templates/datapub/snippets/upload_module.html`, edit the file names of the modules. -Note, if you are developing a React app, e.g., custom `datapub` app, you can use the following attributes passed from the `/templates/datapub/snippets/upload_module.html`: +**Note:** + +- If you are importing a component from the datapub library, when running `yarn build` will generate two CSS files. Both of these CSS files should be added In `/templates/datapub/snippets/upload_module.html` be able to render external components imported. + +e.g. +``` +{% resource 'datapub/css/2.13e0d705.chunk.css' %} +{% resource 'datapub/css/main.c6297111.chunk.css' %} +{% resource 'datapub/js/runtime-main.95a62798.js' %} +{% resource 'datapub/js/2.bfcaf294.chunk.js' %} +{% resource 'datapub/js/main.d1dbf6f8.chunk.js' %} +``` + +- if you are developing a React app, e.g., custom `datapub` app, you can use the following attributes passed from the `/templates/datapub/snippets/upload_module.html`: ```html