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

transpiled modules don't get rebuilt anymore #10260

Closed
2 of 14 tasks
therealcoder1337 opened this issue Jul 31, 2021 · 5 comments
Closed
2 of 14 tasks

transpiled modules don't get rebuilt anymore #10260

therealcoder1337 opened this issue Jul 31, 2021 · 5 comments
Labels

Comments

@therealcoder1337
Copy link

Describe the bug
modules (from node_modules folder) which are transpiled using transpileDependencies and transpile options in quasar.conf.js were previously watched for changes and if changes to those modules occurred, the quasar app (spa in my case) would rebuild and directly apply the changes. this can be useful, if you want to link your dependency and develop it within a quasar app, e. g. via npm link my-dependency. i used this for some years now.
but recently i noticed it doesn't work anymore. there are no errors in the console and the change still appears to be detected. it even looks like it's rebuilding the app (judging by console), but the app never updates the changed part. only restarting the development server (quasar dev) helps, or changing some prop in quasar.conf.js which triggers the whole app to be rebuilt.
this is a major blocker for any development involving (linked) dependencies.

Codepen/jsFiddle/Codesandbox (required)
i don't think this can be shown on codepen, sorry.

To Reproduce
Steps to reproduce the behavior:

  1. create a quasar spa app
  2. add a dependency
  3. link that dependency to your local project (npm link my-dependency in quasar folder)
  4. add that dependency to transpileDependencies and set transpile option to true in quasar.conf.js
  5. quasar dev
  6. change something in the local project that is used by the quasar app (i tested with .vue files)
  7. see that change doesn't get applied

Expected behavior
change should be applied, just as if the dependency was a part of the source code

Platform (please complete the following information):
Quasar Version: 2.0.3
@quasar/app Version: 3.0.3

Quasar mode:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

Tested on:

  • SPA
  • SSR
  • PWA
  • Electron
  • Cordova
  • Capacitor
  • BEX

OS: linux (someone i know could reproduce the issue in windows)
Node: 16 (also tested 14, no difference)
NPM: 7 (also tested 6 - i believe -, no difference)
Yarn:
Browsers:
iOS:
Android:
Electron:

Additional context
I also tried downgrading node, which didn't help. I also tried downgrading the two quasar packages to some betas, which didn't help either.
i think this problem is different from the other one, because it only affects modules and i have no console errors. other one: #10083
i also believe this problem isn't directly about linking, because normal (unlinked) dependencies show the same issues when changed.

@rstoenescu
Copy link
Member

This is an external problem and due to webpack changing its behavior. It's not watching node_module deps anymore.

@therealcoder1337
Copy link
Author

@rstoenescu but it (mostly) worked with the hotfix i posted here: #10083 (comment)
now it doesn't even refresh after f5, how is one supposed to develop a linked module if it doesn't reload?
it also seems that changes to the dependency are still recognized by the cli, because the console output triggeres a "recompile" when i change files of the dependency.

@rstoenescu
Copy link
Member

Think I found the culprit.
Please retry with "@quasar/app" v3.1.6.

@therealcoder1337
Copy link
Author

while hmr is not fixed, it now works after f5. good enough to work with. thank you!

@rstoenescu
Copy link
Member

HMR should work with symlinked deps now. 100%.

Only thing that comes to my mind is you're prolly developing a PWA? In which case: https://quasar.dev/quasar-cli/developing-pwa/hmr-for-dev#introduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants