Skip to content

Commit

Permalink
Use a relative path for the declaration assets (#214)
Browse files Browse the repository at this point in the history
This will resolve the declaration issue.
  • Loading branch information
17cupsofcoffee authored and johnnyreilly committed Oct 6, 2016
1 parent b71cadb commit 3bb0fec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,8 @@ function ensureTypeScriptInstance(loaderOptions: LoaderOptions, loader: any): {
let output = languageService.getEmitOutput(filePath);
let declarationFile = output.outputFiles.filter(filePath => !!filePath.name.match(/\.d.ts$/)).pop();
if (declarationFile) {
compilation.assets[declarationFile.name] = {
let assetPath = path.relative(process.cwd(), declarationFile.name);
compilation.assets[assetPath] = {
source: () => declarationFile.text,
size: () => declarationFile.text.length
};
Expand Down

0 comments on commit 3bb0fec

Please sign in to comment.