code: function possible_webpack_paths(asset_path)
  {
  	// Webpack (prior to v3) always replaces project's own `node_modules` with `~`
  	if (starts_with(asset_path, './node_modules/'))
  	{
  		asset_path = asset_path.replace('./node_modules/', './~/')
  	}
  
  	// if there are any `node_modules` left,
  	// supposing the count is N,
  	// then there are 2 to the power of N possible guesses
  	// on how webpack path might look like.
  	const parts = asset_path.split('/node_modules/')
  
  	return construct_guesses(parts)
  }
docs: Webpack (prior to v3) replaces `node_modules` with `~`. I don't know how exactly it decides whether to replace `node_modules` with `~` or not so it will be a guess: all possible combinations of `~` and `node_modules` in the `asset_path` are constructed and later checked.