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

rebuild application when a new package is added #227

Merged
merged 1 commit into from
Jul 15, 2017

Conversation

reznord
Copy link
Member

@reznord reznord commented Jul 14, 2017

With this PR we can simply add a new package to the application and can use the package right away without restarting the local server.

Took the idea from Facebook's CRA.

Fixes - #208

@reznord reznord self-assigned this Jul 14, 2017
@reznord reznord added this to the 1.4.0 milestone Jul 14, 2017
@reznord
Copy link
Member Author

reznord commented Jul 14, 2017

This works perfectly when you make some changes in JS files (since the webpack catches the changes) but when you straight away install a package, this plugin won't be called.

Any suggestions @developit

@thangngoc89
Copy link
Collaborator

This works perfectly when you make some changes in JS files (since the webpack catches the changes) but when you straight away install a package, this plugin won't be called.

Webpack doesn't watch package.json. Watcher has its limitation

Copy link
Member

@developit developit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with this, I wouldn't expect a rebuild immediately after installing anyway :)

@reznord reznord merged commit 8f1de0e into master Jul 15, 2017
@reznord
Copy link
Member Author

reznord commented Jul 15, 2017

btw, leaving a note here - we can remove this in the upcoming versions of webpack.

Reference links:
webpack/webpack#5297
webpack/watchpack#54

@reznord reznord deleted the feature/reload-node-modules branch July 15, 2017 17:02
@developit
Copy link
Member

Nice, good to know.

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

Successfully merging this pull request may close these issues.

3 participants