Check for DOM in CSSPluginBase.prototype.instantiate()#113
Check for DOM in CSSPluginBase.prototype.instantiate()#113guybedford merged 1 commit intosystemjs:masterfrom
Conversation
| return _retrieveGlobal(); | ||
| }); | ||
| (function(c){if (typeof document == 'undefined') return; var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[a](d.createTextNode(c));}) | ||
| ("@import \"./dep.css\";body{background-color:red;background-image:url(test/data/x.png)}\n/*# sourceMappingURL=__.css.map */"); No newline at end of file |
There was a problem hiding this comment.
Yeah this is a breaking change unfortunately!
We do still need to output CSS for builds :)
There was a problem hiding this comment.
Hrm… I am monkey patching CSSPluginBase in my environment and it builds just fine. I wonder what the difference is?
There was a problem hiding this comment.
Could be that plugin-less currently depends on plugin-css 0.1.30 and plugin-css itself is at 0.1.31.
Maybe the fix needs to be at the plugin-less level.
|
Let me know if you have any ideas moving forward here. Otherwise I'll get to it when I get to it. |
|
Wait. One thing that might be happening is that the test is generating a bundle.css file… Not sure why that isn’t checked in, etc. But the CSS is being built. |
|
So I think that this change is not breaking. The following test overwrites it('Should support separateCSS: true and sourceMaps: false', function() {If I skip this test (with System.registerDynamic("test/data/test.css!css.js", [], false, function ($__require, $__exports, $__module) {
var _retrieveGlobal = System.get("@@global-helpers").prepareGlobal($__module.id, null, null);
(function ($__global) {})(this);
return _retrieveGlobal();
});
(function(c){if (typeof document == 'undefined') return; var d=document,a='appendChild',i='styleSheet',s=d.createElement('style');s.type='text/css';d.getElementsByTagName('head')[0][a](s);s[a](d.createTextNode(c));})
("@import \"./dep.css\";body{background-color:red;background-image:url(test/data/x.png)}\n/*# sourceMappingURL=__.css.map */");I’m not sure why Let me know how you want to proceed, and I will update my PR accordingly. Thanks! |
|
Ahh thanks, sorry yes I hadn't updated those files here. Ok, looks great to me! Thanks again. |
Fixes #111