Skip to content

Commit 4f8c7cc

Browse files
jamesdanielsdavideast
authored andcommitted
fix(build): Fixed more rollup chnages and silenced warnings (angular#1848)
1 parent 334ba7b commit 4f8c7cc

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

tools/build.js

+15-6
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,25 @@ function spawnObservable(command, args) {
116116
}
117117

118118
function generateBundle(input, { file, globals, name }) {
119-
return rollup({ input }).then(bundle => {
120-
return bundle.write({
119+
return rollup({
120+
input,
121+
external: Object.keys(globals),
122+
plugins: [resolve()],
123+
onwarn: warning => {
124+
// Supress Typescript this warning
125+
// https://github.com/rollup/rollup/wiki/Troubleshooting#this-is-undefined
126+
if (warning.code !== 'THIS_IS_UNDEFINED') {
127+
console.log(warning.message);
128+
}
129+
}
130+
}).then(bundle =>
131+
bundle.write({
121132
format: 'umd',
122-
external: Object.keys(globals),
123-
plugins: [resolve()],
124133
file,
125134
globals,
126135
name,
127-
});
128-
});
136+
})
137+
);
129138
}
130139

131140
function createFirebaseBundles(featurePaths, globals) {

0 commit comments

Comments
 (0)