Skip to content
This repository was archived by the owner on Dec 1, 2019. It is now read-only.

Commit 680d036

Browse files
committed
feat(*): update resolver to work with webpack2, refs #109
1 parent f11fa0e commit 680d036

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"rimraf": "^2.5.0",
6666
"tslint": "3.5.0-dev.1",
6767
"typescript": "^1.9.0-dev.20160321",
68-
"webpack": "^1.12.12",
69-
"webpack-dev-server": "^1.14.1"
68+
"webpack": "2.1.0-beta.4"
7069
}
7170
}

src/deps.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ export function createResolver(
3838
return Promise.resolve<string>('%%ignore');
3939
} else {
4040
return resolver(base, dep).then(resultPath => {
41+
if (Array.isArray(resultPath)) {
42+
resultPath = resultPath[0];
43+
}
44+
4145
// ignore excluded javascript
4246
if (!resultPath.match(/.tsx?$/)) {
4347
let matchedExcludes = exclude.filter((excl) => {
@@ -164,7 +168,7 @@ export class FileAnalyzer {
164168

165169
let resolvedImports = await Promise.all(task);
166170

167-
// FIXME ts bug
171+
// FIXME ts bug
168172
return resolvedImports.filter(Boolean) as any;
169173
}
170174

0 commit comments

Comments
 (0)