Skip to content
Permalink
Browse files

fix: Use module options on initial parse

  • Loading branch information...
iamthes committed Nov 16, 2017
1 parent b047363 commit 6ff64a15b510c0fa23cf75d61c69c6a3751326b4
Showing with 2 additions and 3 deletions.
  1. +1 −2 src/file.ts
  2. +1 −1 src/module.ts
@@ -1,8 +1,7 @@
import { readFile } from 'fs';
import { parse } from './parse';
import { Entry } from './entry';
import { resolve as resolvePath } from 'path';
import { dirname } from 'path';
import { dirname, resolve as resolvePath } from 'path';
import { resolveOptions } from './module';
import resolve = require('resolve');

@@ -25,7 +25,7 @@ type ModuleOptions = {

export function module(name: string, options: ModuleOptions = {}): Promise<Entry[]> {
return new Promise<{ entries: Entry[], resolved?: string }>((done, reject) => {
resolve(name, resolveOptions, (err, resolved) => {
resolve(name, { ...resolveOptions, ...options }, (err, resolved) => {
if (err) {
return reject(err);
}

0 comments on commit 6ff64a1

Please sign in to comment.
You can’t perform that action at this time.