mirror of
https://github.com/kevin-DL/sapper.git
synced 2026-01-14 03:54:46 +00:00
move config into single file, add errors to help people migrate
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import * as path from 'path';
|
||||
import relative from 'require-relative';
|
||||
import { CompileResult } from './interfaces';
|
||||
import WebpackResult from './WebpackResult';
|
||||
@@ -8,9 +7,9 @@ let webpack: any;
|
||||
export class WebpackCompiler {
|
||||
_: any;
|
||||
|
||||
constructor(config: string) {
|
||||
constructor(config: any) {
|
||||
if (!webpack) webpack = relative('webpack', process.cwd());
|
||||
this._ = webpack(require(path.resolve(config)));
|
||||
this._ = webpack(config);
|
||||
}
|
||||
|
||||
oninvalid(cb: (filename: string) => void) {
|
||||
|
||||
Reference in New Issue
Block a user