Skip to content

Commit 2120161

Browse files
committed
chore: lighter prod dependencies
We move development dependencies to devDependencies, such that `npm install --omit=dev` becomes faster and more lightweight. In the case of frontend-app-profile, this changes shaves off a few hundred MB of disk space. Note the move of @babel/preset-typescript from devDependencies to dependencies: this fixes MFE build with yarn, which was previously failing: git clone https://github.com/openedx/frontend-app-profile/ cd frontend-app-profile yarn install npm run build Was resulting in the following error: ERROR in ./src/index.jsx Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find package '@babel/preset-typescript' imported from node_modules/@openedx/frontend-build/config/babel-virtual-resolve-base.js This is because yarn does not install devDependencies of package dependencies, as opposed to npm.
1 parent ec9f943 commit 2120161

File tree

3 files changed

+613
-46
lines changed

3 files changed

+613
-46
lines changed

bin/fedx-scripts.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ switch (commandName) {
5858
break;
5959
case 'jest':
6060
ensureConfigOption(presets.jest);
61+
// eslint-disable-next-line import/no-extraneous-dependencies
6162
require('jest/bin/jest');
6263
break;
6364
case 'webpack':
@@ -66,6 +67,7 @@ switch (commandName) {
6667
break;
6768
case 'webpack-dev-server':
6869
ensureConfigOption(presets.webpackDevServer);
70+
// eslint-disable-next-line import/no-extraneous-dependencies
6971
require('webpack-dev-server/bin/webpack-dev-server');
7072
break;
7173
case 'formatjs': {

0 commit comments

Comments
 (0)