File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 8585 ) > " $RELEASE_PATH /package.json"
8686 mv npm-shrinkwrap.json " $RELEASE_PATH "
8787
88- rsync ci/build/npm-postinstall.sh " $RELEASE_PATH /postinstall.sh"
89-
9088 if [ " $KEEP_MODULES " = 1 ]; then
9189 rsync node_modules/ " $RELEASE_PATH /node_modules"
90+ # Remove dev dependencies.
91+ pushd " $RELEASE_PATH "
92+ npm prune --production
93+ popd
9294 fi
95+
96+ rsync ci/build/npm-postinstall.sh " $RELEASE_PATH /postinstall.sh"
9397}
9498
9599bundle_vscode () {
@@ -108,7 +112,9 @@ bundle_vscode() {
108112 # need it for the npm package.
109113 rsync_opts+=(--exclude /node)
110114
111- # Exclude Node modules.
115+ # Exclude Node modules. Note that these will already only include production
116+ # dependencies, so if we do keep them there is no need to do any
117+ # post-processing to remove dev dependencies.
112118 if [[ $KEEP_MODULES = 0 ]]; then
113119 rsync_opts+=(--exclude node_modules)
114120 fi
You can’t perform that action at this time.
0 commit comments