diff --git a/src/compiler/compile/render_ssr/handlers/InlineComponent.ts b/src/compiler/compile/render_ssr/handlers/InlineComponent.ts index 3c2f784455..c90046e550 100644 --- a/src/compiler/compile/render_ssr/handlers/InlineComponent.ts +++ b/src/compiler/compile/render_ssr/handlers/InlineComponent.ts @@ -1,10 +1,9 @@ -import { escape, escape_template, string_literal } from '../../utils/stringify'; +import { string_literal } from '../../utils/stringify'; import { quote_name_if_necessary } from '../../../utils/names'; import Renderer, { RenderOptions } from '../Renderer'; import { get_slot_scope } from './shared/get_slot_scope'; import InlineComponent from '../../nodes/InlineComponent'; import { INode } from '../../nodes/interfaces'; -import Text from '../../nodes/Text'; import { p, x } from 'code-red'; function stringify_attribute(chunk: INode) { diff --git a/src/compiler/compile/render_ssr/handlers/Slot.ts b/src/compiler/compile/render_ssr/handlers/Slot.ts index fd0192526d..c8da24cd79 100644 --- a/src/compiler/compile/render_ssr/handlers/Slot.ts +++ b/src/compiler/compile/render_ssr/handlers/Slot.ts @@ -1,4 +1,3 @@ -import { quote_prop_if_necessary } from '../../../utils/names'; import get_slot_data from '../../utils/get_slot_data'; import Renderer, { RenderOptions } from '../Renderer'; import Slot from '../../nodes/Slot'; @@ -7,9 +6,7 @@ import { x } from 'code-red'; export default function(node: Slot, renderer: Renderer, options: RenderOptions) { const slot_data = get_slot_data(node.values, true); - console.group('push'); renderer.push(); - console.groupEnd(); renderer.render(node.children, options); const result = renderer.pop(); diff --git a/src/compiler/compile/render_ssr/index.ts b/src/compiler/compile/render_ssr/index.ts index e8a58f4477..fba0b2577c 100644 --- a/src/compiler/compile/render_ssr/index.ts +++ b/src/compiler/compile/render_ssr/index.ts @@ -1,7 +1,7 @@ import { b } from 'code-red'; import Component from '../Component'; import { CompileOptions } from '../../interfaces'; -import { stringify } from '../utils/stringify'; +import { stringify, string_literal } from '../utils/stringify'; import Renderer from './Renderer'; import { INode as TemplateNode } from '../nodes/interfaces'; // TODO import Text from '../nodes/Text'; @@ -140,8 +140,8 @@ export default function ssr( return b` ${css.code && b` const #css = { - code: ${css.code ? stringify(css.code) : `''`}, - map: ${css.map ? stringify(css.map.toString()) : 'null'} + code: "${css.code}", + map: ${css.map ? string_literal(css.map.toString()) : 'null'} };`} ${component.extract_javascript(component.ast.module)}