deprecate renderCss

pull/1024/head
Rich Harris 7 years ago
parent 545ed7f0ed
commit 22ba8f74ca

@ -155,7 +155,13 @@ export default function ssr(
map: ${cssMap ? stringify(cssMap.toString()) : 'null'}
};
var warned = false;
${name}.renderCss = function() {
if (!warned) {
console.error('Component.renderCss(...) is deprecated and will be removed in v2 — use Component.render(...).css instead');
warned = true;
}
var components = [];
${generator.stylesheet.hasStyles &&

@ -39,7 +39,13 @@ SvelteComponent.css = {
map: null
};
var warned = false;
SvelteComponent.renderCss = function() {
if (!warned) {
console.error('Component.renderCss(...) is deprecated and will be removed in v2 — use Component.render(...).css instead');
warned = true;
}
var components = [];
return {

@ -41,7 +41,13 @@ SvelteComponent.css = {
map: null
};
var warned = false;
SvelteComponent.renderCss = function() {
if (!warned) {
console.error('Component.renderCss(...) is deprecated and will be removed in v2 — use Component.render(...).css instead');
warned = true;
}
var components = [];
return {

Loading…
Cancel
Save