From 576844e5cae6cbcecebd6eb023cedb3640683eb6 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Fri, 4 May 2018 15:01:52 +1000 Subject: [PATCH] fix(plugin-webpack): fix config resolution when providing a string --- packages/plugin/webpack/src/WebpackPlugin.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin/webpack/src/WebpackPlugin.ts b/packages/plugin/webpack/src/WebpackPlugin.ts index c599b528d4..6d73833f1d 100644 --- a/packages/plugin/webpack/src/WebpackPlugin.ts +++ b/packages/plugin/webpack/src/WebpackPlugin.ts @@ -28,7 +28,7 @@ export default class WebpackPlugin extends PluginBase { } private resolveConfig = (config: Configuration | string) => { - if (typeof config === 'string') return require(config) as Configuration; + if (typeof config === 'string') return require(path.resolve(path.dirname(this.baseDir), config)) as Configuration; return config; }