diff --git a/packages/zone.js/dist/BUILD.bazel b/packages/zone.js/dist/BUILD.bazel index 2ab724db22..dbbe26a88a 100644 --- a/packages/zone.js/dist/BUILD.bazel +++ b/packages/zone.js/dist/BUILD.bazel @@ -100,6 +100,8 @@ genrule( ], cmd = " && ".join([ "mkdir -p $(@D)", + # remove the last line '//# sourceMappingURL=b[0].umd.js.map' because we don't release + # source map for now "sed '$$d' $(@D)/" + b[0].replace("-", "_") + "_rollup.es5umd.js > $(@D)/" + b[0] + ".js", "cp $(@D)/" + b[0].replace("-", "_") + "_rollup.min.es5umd.js $(@D)/" + b[0] + ".min.js", ]), @@ -174,6 +176,8 @@ genrule( ], cmd = " && ".join([ "mkdir -p $(@D)", + # remove the last line '//# sourceMappingURL=b[0].umd.js.map' because we don't release + # source map for now "sed '$$d' $(@D)/" + b.replace("-", "_") + "_rollup.umd.js > $(@D)/" + b + ".js", "cp $(@D)/" + b.replace("-", "_") + "_rollup.min.umd.js $(@D)/" + b + ".min.js", ]), diff --git a/packages/zone.js/test/npm_package/npm_package.spec.ts b/packages/zone.js/test/npm_package/npm_package.spec.ts index 1c9de06332..b4414ad9cd 100644 --- a/packages/zone.js/test/npm_package/npm_package.spec.ts +++ b/packages/zone.js/test/npm_package/npm_package.spec.ts @@ -49,11 +49,16 @@ describe('Zone.js npm_package', () => { describe('es5', () => { it('zone.js(es5) should not contain es6 spread code', () => { expect(shx.cat('zone.js')).not.toContain('let value of values'); }); + + it('zone.js(es5) should not contain source map comment', + () => { expect(shx.cat('zone.js')).not.toContain('sourceMappingURL'); }); }); describe('es2015', () => { it('zone-evergreen.js(es2015) should contain es6 code', () => { expect(shx.cat('zone-evergreen.js')).toContain('let value of values'); }); + it('zone.js(es5) should not contain source map comment', + () => { expect(shx.cat('zone-evergreen.js')).not.toContain('sourceMappingURL'); }); }); describe('dist file list', () => {