Skip to content

Commit 0a807e6

Browse files
committed
fix lint
1 parent cccf156 commit 0a807e6

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

packages/webpack/src/plugin.ts

+3-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ import { AngularCompilerOptions } from '@angular/tsc-wrapped';
1515
* Option Constants
1616
*/
1717
export type NgcCompilerMode = 'aot' | 'jit'
18-
export interface EmittedFile {
19-
sourceMap: any,
20-
source: string
21-
}
18+
2219

2320
export interface AngularWebpackPluginOptions {
2421
tsconfigPath?: string;
@@ -71,7 +68,8 @@ export class NgcWebpackPlugin {
7168
this.rootModuleName = rootNgModule;
7269
this.compilerHost = ts.createCompilerHost(this.compilerOptions, true);
7370
this.program = ts.createProgram(this.files, this.compilerOptions, this.compilerHost);
74-
this.reflectorHost = new ngCompiler.ReflectorHost(this.program, this.compilerHost, this.angularCompilerOptions);
71+
this.reflectorHost = new ngCompiler.ReflectorHost(
72+
this.program, this.compilerHost, this.angularCompilerOptions);
7573
this.reflector = new ngCompiler.StaticReflector(this.reflectorHost);
7674
}
7775

packages/webpack/src/reflector_host.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ export function patchReflectorHost(codeGenerator: CodeGenerator) {
2222
const result = oldGIP.call(this, containingFile, baseDirAndName + '.css' + shim + ext);
2323

2424
return result.replace(/\.css\./, styleExt + '.');
25-
}
25+
};
2626
}

packages/webpack/src/resource_loader.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ import {readFileSync} from 'fs';
33
import * as vm from 'vm';
44
import * as path from 'path';
55

6-
const SingleEntryDependency = require('webpack/lib/dependencies/SingleEntryDependency');
76
const NodeTemplatePlugin = require('webpack/lib/node/NodeTemplatePlugin');
87
const NodeTargetPlugin = require('webpack/lib/node/NodeTargetPlugin');
98
const LoaderTargetPlugin = require('webpack/lib/LoaderTargetPlugin');
10-
const LibraryTemplatePlugin = require('webpack/lib/LibraryTemplatePlugin');
119
const SingleEntryPlugin = require('webpack/lib/SingleEntryPlugin');
1210

1311

@@ -23,7 +21,8 @@ export class WebpackResourceLoader implements ResourceLoader {
2321
private _compile(filePath: string, content: string): Promise<any> {
2422
const compilerName = `compiler(${this._uniqueId++}:${filePath})`;
2523
const outputOptions = { filename: filePath };
26-
const childCompiler = this._compilation.createChildCompiler(path.relative(this._context || '', filePath), outputOptions);
24+
const relativePath = path.relative(this._context || '', filePath);
25+
const childCompiler = this._compilation.createChildCompiler(relativePath, outputOptions);
2726
childCompiler.context = this._context;
2827
childCompiler.apply(
2928
new NodeTemplatePlugin(outputOptions),

0 commit comments

Comments
 (0)