ORCID-Source
ORCID-Source copied to clipboard
Webpack does not build angular_orcid_generated.js for production
https://orcid.org/static/release-1.232.2/javascript/ng1Orcid/angular_orcid_generated.js
Notice all the eval
statements and escaped quotes. The file weighs about 8MB.
In the webpack config it appears that the mode is always set to development
. I believe calling your build script via CLI like webpack --mode=production
will properly minify this file.
See also https://webpack.js.org/guides/production/
Thanks @jasonbarry, you're right that web.config.js builds in dev mode, however, we have several different config files that we use for different environments.
The config used in sandbox/prod builds in prod mode and the generated file comes in at ~1.4MB.
The environment can be switched by passing an arg into the Maven command described in orcid-nodejs.
@lizkrznarich perhaps the env var isn't making its way to production then — I'm seeing the file is 7.96MB on orcid.org.

curl -s https://orcid.org/static/release-1.232.2/javascript/ng1Orcid/angular_orcid_generated.js | grep eval | wc -l
produces 875 lines.
#4747
Closing this as very old