我有一個npm包,它是一個React組件,我已經構建並在我的私有npm服務器上託管。生產模式下的UglifyJSPlugin顯示React開發模式警告
我有一個React網絡應用程序,用於下載此包並在頁面上使用它。
組件和web應用程序都使用webpack使用UglifyJSPlugin構建。
當生產標誌運行的WebPack,我收到以下警告:
warning.js:36Warning: It looks like you're using a minified copy of the development build of React. When deploying React apps to production, make sure to use the production build which skips development warnings and is faster. See [stack won't let me post urls..]fb.me/react-minification for more details.
當我從網絡應用的的WebPack配置中刪除UglifyJSPlugin並隨着生產標誌的WebPack運行,此警告不會出現。
有關如何在生產模式下使用UglifyJSPlugin時刪除警告的任何想法?
相當神祕的答案。如果你用代碼顯示你的意思會更好。 – robertklep
在手機上輸入答案很難。你可以在這裏看到:https://github.com/codaxy/cx-starter-kit/blob/master/config/webpack.prod.js – Marko