Skip to content

Commit

Permalink
resolve vars from imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Barak Igal committed Jul 20, 2017
1 parent b00bbef commit 98f75d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 98f75d2

Please sign in to comment.