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

hlx up does not reload changes of local JS required files #684

Closed
kptdobe opened this issue Mar 25, 2019 · 1 comment · Fixed by #708
Closed

hlx up does not reload changes of local JS required files #684

kptdobe opened this issue Mar 25, 2019 · 1 comment · Fixed by #708
Assignees
Labels
bug Something isn't working

Comments

@kptdobe
Copy link
Contributor

kptdobe commented Mar 25, 2019

Description
If you require a local JS file from a pre.js, the changes in that local JS file will not be reloaded after a change, even though hlx up says it has rebuilt the project files.

To Reproduce
Steps to reproduce the behavior:

  1. hlx demo test
  2. cd test/src
  3. Create a util.js file with content (completely arbitrary):
module.exports.log = function(msg) {
    console.log(`LOG: ${msg}`);
};
  1. Edit html.pre.js:
const util = require('./util');

function pre(payload) {
  util.log('Hello world');
}

module.exports.pre = pre;
  1. Run hlx up
  2. See the terminal log output: LOG: Hello world
  3. Edit util.js and change the log output:
    console.log(`This is a nicer log prefix: ${msg}`);
  1. Save and see the terminal log output: Rebuilding project files...done Xms (changes have been detected
  2. Reload the page

-> See the terminal log output: LOG: Hello world. It should be This is a nicer log prefix: Hello world.

The only way to get the latest modification is to restart hlx up!

Expected behavior
Changes are reloaded.

Version:
run: $ hlx --version
v0.13.11-pre.10

@kptdobe kptdobe added the bug Something isn't working label Mar 25, 2019
@tripodsan
Copy link
Contributor

should be possible to easily delete all modified modules from the resolver cache.

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

Successfully merging a pull request may close this issue.

2 participants