The problem is when you load the page, the main js file (created in the build) is not there. So, comparing both files in both cases:
xxx.netlify.com/js/app.a23a34e2.js —> works fine
mydomain.com/js/app.bb389afb.js —> returns 404 error HTML page
I realized the names of the files are different, it makes no sense because they should work against the same build.
Also, if I try with my domain and the js file name from the netlify domain, it works fine:
I have tried to run a “clear cache and deploy site” but the problem is still there.
The build configuration seems ok:
Build command: npm run build
Publish directory: dist
So, it seems like a bug or am I doing something wrong?