fix(compiler): Don't strip /*# sourceURL ... */ (#16088)

Currently, `shimCssText` only keep `/*# sourceMappingUrl ... */` comments and strip `/*# sourceURL ... */` comments. So, Chrome can't find the source maps for component style(that's created in new `style` tags)

PR Close #16088
This commit is contained in:
Zhicheng Wang
2017-04-18 22:11:33 +08:00
committed by Miško Hevery
parent 54238822e6
commit de6c6445af
2 changed files with 12 additions and 7 deletions

View File

@ -300,6 +300,11 @@ import {normalizeCSS} from '@angular/platform-browser/testing/src/browser_util';
expect(s('b {c}/* #sourceMappingURL=data:x */', 'contenta'))
.toEqual('b[contenta] {c}/* #sourceMappingURL=data:x */');
});
it('should keep sourceURL comments', () => {
expect(s('/*# sourceMappingURL=data:x */b {c}/*# sourceURL=xxx */', 'contenta'))
.toEqual('b[contenta] {c}/*# sourceMappingURL=data:x *//*# sourceURL=xxx */');
});
});
describe('processRules', () => {