Skip to content

Commit

Permalink
Fixed building static in case of absolute output
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anru authored Mar 7, 2019
1 parent 521a6a4 commit 5f3c575
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/core/src/server/preview/iframe-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
},
Expand Down

0 comments on commit 5f3c575

Please sign in to comment.