Implement a self-contained, webpack-independent version of the test case and workaround.