PrismarineJS/prismarine-viewer

The issue has been closed
Relative path of worker.js cause loading error when using pviewer as a front end component #201
portwatcher posted onGitHub
This line https://github.com/PrismarineJS/prismarine-viewer/blob/master/viewer/lib/worldrenderer.js#L22 decides pviewer to load woker.js relative to present path of where pviewer is used.
Say we have wrapped a "schematic renderer" component and use it in our project. Typically this component will be used under the path like domain/foo/bar/:id, and pviewer will request worker.js at domain/foo/bar/worker.js not domain/worker.js
Not only worker.js, JSON files of blockStates, etc, have the same problem.