can you use `path.resolve(path.dirname(result.resource), newResource)` instead?

only `"after-resolve"` is correct. In `"before-resolve"` it shouldn't be a absolute path. can you remove the resolve from `"before-resolve"`?