You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Relates #21 Regarding optimizing the build/install process of the frontend.
There are 3 sections, for install, build and for both.
1. Optimizing the install process (for production)
When running npm install for production typically the case is to to install the node packages just so the project can be built, and then to use the bundle..etc. In that case, we might opt out for installing the dev dependency and
1.1 Skip auditing
When running npm install, npm by default runs auditing scripts to recommend fixes to detect the vulnerability, however sometimes this is not necessary, for example when developing or when running automated scrips, so changing this flag either in tutor or devstak would increase time about 10% lower npm install --no-audit
1.2 Skip dev-depedency
This should be very useful exactly when running on production, for example, if we are only going to build the MFE app, there wouldn’t need either to check or install the dev-dependency. npm install --only=prod
Note: Both options above can be used in conjunction i.e. npm install --only=prod -no-audit
2. Optimizing the build process
Haven't personally digged into yet, though there is a discussion/issue already opened in the BTRWG here: openedx/wg-build-test-release#8
3. Optimizing both the build and install process
This section suggests actions or steps, that might influence both the install and the build process
3.1 Upgrade to NPM >=7
NPM version 7 started using the new version of the lock file, in other words, it deals with the pacakge-lock.json in a different way, one of the reason for the new version is intended to enhance how the npm handles the dependency tree have optimized these processes, ref
As of npm v7, lockfiles include enough information to gain a complete picture of the package tree, reducing the need to read package.json files, and allowing for significant performance improvements.
The text was updated successfully, but these errors were encountered:
To me this sounds like a documentation task, since operators are responsible for their own build/deployment infrastructure today, for the most part. We're expecting to upgrade to npm 8 as part of the Node 16 upgrade here: #2
Relates #21 Regarding optimizing the build/install process of the frontend.
There are 3 sections, for install, build and for both.
1. Optimizing the install process (for production)
When running
npm install
for production typically the case is to to install the node packages just so the project can be built, and then to use the bundle..etc. In that case, we might opt out for installing the dev dependency and1.1 Skip auditing
When running npm install, npm by default runs auditing scripts to recommend fixes to detect the vulnerability, however sometimes this is not necessary, for example when developing or when running automated scrips, so changing this flag either in tutor or devstak would increase time about 10% lower
npm install --no-audit
1.2 Skip dev-depedency
This should be very useful exactly when running on production, for example, if we are only going to build the MFE app, there wouldn’t need either to check or install the dev-dependency.
npm install --only=prod
Note: Both options above can be used in conjunction i.e.
npm install --only=prod -no-audit
2. Optimizing the build process
Haven't personally digged into yet, though there is a discussion/issue already opened in the BTRWG here: openedx/wg-build-test-release#8
3. Optimizing both the build and install process
This section suggests actions or steps, that might influence both the install and the build process
3.1 Upgrade to NPM >=7
NPM version 7 started using the new version of the lock file, in other words, it deals with the
pacakge-lock.json
in a different way, one of the reason for the new version is intended to enhance how the npm handles the dependency tree have optimized these processes, refThe text was updated successfully, but these errors were encountered: