91f0459753
Summary: This is the first observable step toward #643. Assets whose paths are known as literals at server-side rendering time are now referenced via relative paths. This means that the favicon and JavaScript bundle can be loaded from an arbitrary gateway. The actual bundle code will still only work when loaded from `/`. This commit stands alone so that the enclosing change to the Webpack config can be in as small a change as possible. Test Plan: - Note that `yarn start` still works. - Run `./scripts/build_static_site.sh` to build the site into, say, `/tmp/gateway`. - Run a static web server from `/tmp/gateway/` and note that (a) the paths listed in the page source are relative, and (b) everything works as intended, with no console messages in either Chrome or Firefox. - Run a static web server from `/tmp/` and navigate to `/gateway/` in the browser. Note that the favicon and JavaScript are correctly noted, but that the router raises an error because it is trying to load a non-existent route. (This behavior is unchanged.) wchargin-branch: relative-lexically-static |
||
---|---|---|
.. | ||
jest | ||
RemoveBuildDirectoryPlugin.js | ||
babel.js | ||
env.js | ||
makeWebpackConfig.js | ||
paths.js | ||
polyfills.js | ||
test.js | ||
webpack.config.backend.js |