getRelativePath = chunk => {
							const baseOutputName = currentOutputName.slice();
							const chunkOutputName = compilation
								.getPath(
									getChunkFilenameTemplate(chunk, compilation.outputOptions),
									{
										chunk,
										contentHashType: "javascript"
									}
								)
								.replace(/^\/+/g, "")
								.split("/");

							// remove common parts except filename
							while (
								baseOutputName.length > 1 &&
								chunkOutputName.length > 1 &&
								baseOutputName[0] === chunkOutputName[0]
							) {
								baseOutputName.shift();
								chunkOutputName.shift();
							}
							const last = chunkOutputName.join("/");
							// create final path
							return getUndoPath(baseOutputName.join("/"), last, true) + last;
						}
@param {Chunk} chunk the chunk
@returns {string} the relative path