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

Changes to style files are not picked up by assets watch #332

Open
avivace opened this issue Nov 9, 2022 · 4 comments
Open

Changes to style files are not picked up by assets watch #332

avivace opened this issue Nov 9, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@avivace
Copy link
Member

avivace commented Nov 9, 2022

Package version (if known): 1.0.11

Describe the bug

While invenio-cli assets watch is up, changes in your instance's assets/ folder are not picked up (no rebuild is triggered).

Steps to Reproduce

Cookie cutter an instance of InvenioRDM and follow the official instructions to bring it up locally (install, setup, run) while on another shell bring up invenio-cli assets watch.

Make any changes to the files shipped by default under assets/less/site/globals (e.g. to site.variables, as suggested by the official instructions). A rebuild is required to see any changes (i.e. invenio-cli assets build) which may not be desirable, considering the time it takes.

Expected behavior

Changes to the mentioned files are expected to trigger a (hot) reload of the webpack build.

Workaround

As suggested by @kpsherva , this works:

ln -s <YOUR_LOCAL_INVENIORDM_PATH>/assets/less/cds-rdm ~/.virtualenvs/<VIRTUALENV>/var/instance/assets/less

But it must be done every time a full rebuild happens (i.e. on invenio-cli assets build). The VIRTUALENV path can be seen for example when running pipenv shell and checking where it's activated from.

@avivace avivace added the bug Something isn't working label Nov 9, 2022
@fenekku
Copy link
Contributor

fenekku commented Feb 27, 2023

For me with

  • invenio-app-rdm v11.0
  • node 14.18.2
  • npm 6.14.15

The problem occurs with files symlinked (not sure the difference between folder and file symlink would make):

.venv/var/instance/assets/less/site/globals/site.variables -> /home/me/path/to/instance/assets/less/site/globals/site.variables

And with

  • node 16.19.1
  • npm 8.19.3

the problem persists as well.

@fenekku
Copy link
Contributor

fenekku commented Feb 27, 2023

Oh and invenio-cli assets watch doesn't deal with the icon font correctly for me in v11:

icons_bug

invenio-cli assets build does

image

In v9 this used to all be good.

@avivace
Copy link
Member Author

avivace commented Feb 27, 2023

Oh and invenio-cli assets watch doesn't deal with the icon font correctly for me in v11:

icons_bug

invenio-cli assets build does

image

In v9 this used to all be good.

I don't know if those two are related, but this happens to me too sometimes and I remember the same issue being reported on the Discord server by @Pineirin

@monotasker
Copy link

Is there any sense of where a fix for this falls on the list of priorities? Is it something that will likely be fixed soon or should I be looking at alternative approaches?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants