From 5f3c575a59fde52edf33b4ae1987f59d3a3c9cc5 Mon Sep 17 00:00:00 2001 From: Andrey Rublev Date: Thu, 7 Mar 2019 15:37:42 +0200 Subject: [PATCH] Fixed building static in case of absolute output path.join is unsafe when using absolute paths after first argument. For resolving from cwd path.resolve function is safe and makes correct results in both cases, using absolute or relative paths. --- lib/core/src/server/preview/iframe-webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/src/server/preview/iframe-webpack.config.js b/lib/core/src/server/preview/iframe-webpack.config.js index 3cb4ac5e0fd..02e094d195d 100644 --- a/lib/core/src/server/preview/iframe-webpack.config.js +++ b/lib/core/src/server/preview/iframe-webpack.config.js @@ -37,7 +37,7 @@ export default ({ devtool: '#cheap-module-source-map', entry: entries, output: { - path: path.join(process.cwd(), outputDir), + path: path.resolve(process.cwd(), outputDir), filename: '[name].[hash].bundle.js', publicPath: '', },