Skip to content

Commit 7791819

Browse files
authored
linked the rollup calling to build ES (#1251)
* name updated in package json * linked the roll up config to buildES
1 parent f417a6c commit 7791819

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

scripts/utils/build.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,20 @@ function buildES(pkg) {
134134
try {
135135
const rollupConfigPath = path.resolve(__dirname, '..', '..', 'rollup.config.js');
136136
const callingRollupConfigPath = path.resolve(__dirname, '..', '..', 'rollup.calling-config.js');
137-
// Rollup cleans the `es` folder automatically
138-
console.info(`Packaging ${pkg}...`.cyan);
139-
140-
execSync(`cd ${targetPkgPath} && rollup -c ${rollupConfigPath}`);
141-
142-
console.info(`${pkg}... Done\n\n`.cyan);
143-
144-
// execSync(`cd widgets && rollup -c ${callingRollupConfigPath}`);
137+
138+
139+
140+
141+
if(`${pkg}` === 'widget-call-history' ){
142+
console.info(`Packaging ${pkg}...`.cyan);
143+
// Rollup cleans the `es` folder automatically
144+
execSync(`cd widgets && rollup -c ${callingRollupConfigPath}`);
145+
}else{
146+
// Rollup cleans the `es` folder automatically
147+
console.info(`Packaging ${pkg}...`.cyan);
148+
execSync(`cd ${targetPkgPath} && rollup -c ${rollupConfigPath}`);
149+
}
150+
145151

146152
}
147153
catch (err) {

0 commit comments

Comments
 (0)