Single Page App with react framework + webpack, cannot load the chunk JS

Let say I have a SPA, homepage URL is
When I clicked on the button in the page, will display in the browser address bar.
Under the chrome devtool -> network tab, I only can observe is loaded.

The question, when I use the k6 http.get method to call URL, I noticed the content of the page is not showing response data, how can not just hard code this URL because when there is a new deployment, the JS filename will changes. How can i overcome this issue?

Hi @xyngfei!

In this case, you’d have to parse the response for the url to use. Given the url pattern, something like


should be enough to capture the dynamic part of your filename.

(I’ve not tested this regex, so you might have to tweak it to get it to work)


This is a good method. However, the previous request may not have this xxx.chunk.js filename to make the next request

For example, look at this button, when you click on it will load another xxx.chunk.js file. I don’t see any js link can extract. Any better suggestion?