Skip to content

feat(webpack): allow watching node_modules #9781

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

Merged
merged 3 commits into from
Feb 18, 2022

Conversation

rigor789
Copy link
Member

PR Checklist

What is the current behavior?

What is the new behavior?

Passing --env.watchNodeModules, or adding the following to the webpack.config.js:

const webpack = require("@nativescript/webpack");

module.exports = (env) => {
  // enable watching node_modules
  env.watchNodeModules = true;
  
  webpack.init(env);
  
  // Learn how to customize:
  // https://docs.nativescript.org/webpack
  
  return webpack.resolveConfig();
};

Will trigger a rebuild when something in node_modules changes. This is disabled by default as in most cases node_modules shouldn't change, however this is useful when debugging a plugin/core etc right in node_modules.

@cla-bot cla-bot bot added the cla: yes label Feb 17, 2022
@rigor789 rigor789 added docs needed Additional documentation on this issue/PR is needed webpack labels Feb 17, 2022
@rigor789 rigor789 added this to the 8.2 milestone Feb 17, 2022
@rigor789 rigor789 merged commit 9c9c831 into master Feb 18, 2022
@rigor789 rigor789 deleted the feat/webpack-watch-node_modules branch February 18, 2022 12:39
@rigor789 rigor789 removed the docs needed Additional documentation on this issue/PR is needed label Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant