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

v4 Feature: Reenable watching node_modules and recompile on change #3506

Closed
1 of 2 tasks
susnux opened this issue Jul 2, 2021 · 1 comment
Closed
1 of 2 tasks

v4 Feature: Reenable watching node_modules and recompile on change #3506

susnux opened this issue Jul 2, 2021 · 1 comment

Comments

@susnux
Copy link

susnux commented Jul 2, 2021

  • This is a bug
  • This is a modification request

Code

If you enable watchFiles (as a replacement for watchOptions from the old version) only static files are served.

// webpack.config.js
   devServer: {
      watchFiles: {paths: ['/node_modules/@mymodules']}
    },

Please paste the results of webpack-cli info here, and mention other relevant information

I am using webpack-dev-server@4.0.0-beta.3

  System:
    OS: Linux 5.12 openSUSE Tumbleweed 20210629
    CPU: (12) x64 AMD Ryzen 5 1600 Six-Core Processor
    Memory: 24.12 GB / 31.27 GB
  Binaries:
    Node: 16.4.0 - /tmp/yarn--1625228312161-0.8953605594414591/node
    Yarn: 1.22.10 - /tmp/yarn--1625228312161-0.8953605594414591/yarn
    npm: 7.18.1 - /usr/bin/npm
  Browsers:
    Firefox: 89.0.2
  Packages:
    eslint-webpack-plugin: ^2.5.4 => 2.5.4 
    modify-source-webpack-plugin: ^3.0.0-rc.0 => 3.0.0 
    webpack-cli: ^4.7.2 => 4.7.2 

Expected Behavior

Changed modules get recompiled and inserted into served files.

Actual Behavior

Only static content is reloaded

For Bugs; How can we reproduce the behavior?

For Features; What is the motivation and/or use-case for the feature?

The old behavior with watchOptions and ignored allowed us to enabled watching for changes of a module in node_modules.
So you can develop an extension for your app, e.g. you could develop a library and hotreload changes on the using application.

Or our usage was to develop a Quasar app extension and to have the using application to test it while developing.

This is not possible anymore, as watchFiles does not trigger a recompile of the changed module.

@alexander-akait
Copy link
Member

No, it was answered a lot of time, please use search, here answer #3453

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

No branches or pull requests

2 participants