GithubHelp home page GithubHelp logo

Comments (5)

bokub avatar bokub commented on August 30, 2024

Hello,

Can you please provide an example of what you changed in vanity.js, so I can test with the exact same conditions?

Also, did you see any warning or error in the console where you run yarn serve ?

By the way, this project uses npm, not yarn, so you should maybe delete your node_modules folder and run npm i instead of yarn. Using yarn may download different dependencies because it doesn't use the same lock file as npm.

from vanity-eth.

helloairdrop avatar helloairdrop commented on August 30, 2024

Hello,

I added some new code like log: console.log('call to vanity js file') under line 6 in vanity.js file or another in onmessage fuction: console.log('onmessage emit')

When I am running with yarn serve there is no error or warning and I tried to run with npm (deleted node_modules ), it never reloads and applys new code on the app as well (same yarn)

Reproduce:

  1. get the source code on github
  2. run npm i
  3. run npm run serve (it's working on port 8080)
  4. change some code in vanity.js file, like console.log('checking the changes') then save (the app doesn't reload and the new code doesn't apply)
  5. try again to change some code

I found some config can help it reload and apply the new code: https://stackoverflow.com/questions/60069459/npm-run-build-without-cache-folder-in-node-modules, we can add this code into file vue.config.js, it will delete cache whenever we change the code

config.module.rule('vue').uses.delete('cache-loader');
config.module.rule('js').uses.delete('cache-loader');

Not sure this is the good solution or not, if you have better solution, could you share me?
Thank you!!!

image

from vanity-eth.

helloairdrop avatar helloairdrop commented on August 30, 2024

from vanity-eth.

bokub avatar bokub commented on August 30, 2024

A console.log here would create a log in the browser, not in the terminal.

Are you sure you're looking in the right place ?

from vanity-eth.

bokub avatar bokub commented on August 30, 2024

OK, there is some issue with the hot-reload mechanism for this file...

After changes to vanity.js, you can do the following to make sure it's re-compiled:

rm -rf node_modules/.cache
npm run serve

from vanity-eth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.