agilgur5 / agilgur5/front-end-base

use NpmInstallPlugin to fix unintuitive-ness with compilation after installing a module

未關閉
#3 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
0
分支
1
PR 合併指標
30 天內沒有已合併 PR

描述

The basic problem is explained well in CRA: https://github.com/facebook/create-react-app/issues/186 . Unintuitive but does work eventually (I don't think I even knew it would work on the second save though, pretty sure I just thought it didn't work period :o).

https://github.com/facebook/create-react-app/pull/212#issuecomment-235284840 and the sentiment of this issue in general is similar to some of my own reservations -- I'd much rather `npm install` the package myself and the auto install is different from the usual process of development without running a watcher or this plugin.
In this case, I think using [react-dev-utils](https://www.npmjs.com/package/react-dev-utils)'s [WatchMissingNodeModulesPlugin](https://www.npmjs.com/package/react-dev-utils#new-watchmissingnodemodulespluginnodemodulespath-string) might make more sense to include. That might be the only thing I would use from that package though (so installing the whole thing is a bit wasteful, but ¯\\\_(ツ)_/¯ )

Another important note about the NpmInstallPlugin is that it currently doesn't work with Webpack 4 and has a number of outstanding issues: https://github.com/webpack-contrib/npm-install-webpack-plugin/pull/123 . https://www.npmjs.com/package/webpack-plugin-install-deps is a fork from the PR that supports Webpack 4 fwiw.

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。