From 7568a9145bd7c45e7c627caa844a66c42ede8ef2 Mon Sep 17 00:00:00 2001 From: Ivan Hofer Date: Fri, 2 Apr 2021 16:11:37 +0200 Subject: [PATCH] add root as compile option also in prod mode --- .../compile/render_dom/wrappers/InlineComponent/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts index 1e9818c78b..6de1561922 100644 --- a/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts +++ b/src/compiler/compile/render_dom/wrappers/InlineComponent/index.ts @@ -186,12 +186,13 @@ export default class InlineComponentWrapper extends Wrapper { } } + component_opts.properties.push(p`root: #ctx.root`); + if (component.compile_options.dev) { // TODO this is a terrible hack, but without it the component // will complain that options.target is missing. This would // work better if components had separate public and private // APIs - component_opts.properties.push(p`root: #ctx.root`); component_opts.properties.push(p`$$inline: true`); }