Closed styfle closed 6 years ago
The ansible scripts install node modules with the --production
flag.
The postinstall
script runs build and minify.
I can see that the JavaScript is minified: https://david-dm.org/bundle-23.1.0.js
Perhaps the NODE_ENV
variable needs to also be set? Are you able to verify this is the case @styfle?
@alanshaw Correct, you must set NODE_ENV=production
during build time to get the optimized react output or include the pre-built UMD script as an external.
See the docs here: https://reactjs.org/docs/optimizing-performance.html
You need to set NODE_ENV=production
and use dead code elimination using uglifyify
in order to get this warning to go away. See PR #399 for details.
\o/ thanks all
There must be a dev build of React being included on the david-dm.org website because the react dev tools are showing the warning below:
Did you forget to set
NODE_ENV=production
environment variable?https://github.com/styfle/react-server-example-tsx#deployment