nwb

Why does an npm module I wrote install so many packages after creating project with create-react-app?

[亡魂溺海] 提交于 2021-01-28 10:47:55
问题 I wrote this npm module, react-heartbeat, using nwb. When I install this module in a new project, npm i react-heartbeat , just after running npm init it takes less than 2 seconds and only installs 1 package. When I install this module, again npm i react-heartbeat , after creating a project with create-react-app , it takes nearly 3 minutes, adds 420 packages, removes 218 packages and updates 1257 packages . What am I doing wrong? My npm module is very simple, just 1 React component. It has no

Why does an npm module I wrote install so many packages after creating project with create-react-app?

白昼怎懂夜的黑 提交于 2021-01-28 10:44:28
问题 I wrote this npm module, react-heartbeat, using nwb. When I install this module in a new project, npm i react-heartbeat , just after running npm init it takes less than 2 seconds and only installs 1 package. When I install this module, again npm i react-heartbeat , after creating a project with create-react-app , it takes nearly 3 minutes, adds 420 packages, removes 218 packages and updates 1257 packages . What am I doing wrong? My npm module is very simple, just 1 React component. It has no

nwb build-react-app creates root path rather than relative path

核能气质少年 提交于 2019-12-24 05:56:32
问题 I am testing out nwb to streamline building react apps using this example project. While the app is built, the path of css and js files referenced in index.html are in root rather than relative. Is there any way to change the referencing? For example: In the html, the reference are the following, <script type="text/javascript" src="/vendor.b3f34f12.js"></script> <script type="text/javascript" src="/app.9b5c57d3.js"></script> Instead of, <script type="text/javascript" src="./vendor.b3f34f12.js