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.
This commit is contained in:
Andrey Rublev 2019-03-07 15:37:42 +02:00 committed by GitHub
parent 521a6a430d
commit 5f3c575a59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: '',
},