From 98f75d2ae28a59fc6fcf89fb16755551ce8b3273 Mon Sep 17 00:00:00 2001 From: Barak Igal Date: Thu, 20 Jul 2017 17:56:57 +0300 Subject: [PATCH] resolve vars from imports --- src/resolver.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/resolver.ts b/src/resolver.ts index 1ab936dbd..ced5fa857 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -3,7 +3,7 @@ import { Import } from './import'; import { Stylesheet } from './stylesheet'; import { Pojo } from './types'; import { valueMapping } from './stylable-value-parsers'; - +import { valueTemplate } from './value-template'; export interface Module { default: any; [key: string]: any; @@ -39,7 +39,7 @@ export class Resolver { acc[importDef.defaultExport || importDef.from] = resolved.default || resolved; const isStylesheet = Stylesheet.isStylesheet(resolved); for (const name in importDef.named) { - acc[name] = isStylesheet ? resolved.vars[name] : resolved[name]; + acc[name] = isStylesheet ? valueTemplate(resolved.vars[name], resolved.vars) : resolved[name]; } return acc; }, {} as Pojo);