sourcecred/config
William Chargin 91f0459753
Use relative paths for lexically static assets (#671)
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
2018-08-15 15:30:23 -07:00
..
jest Add jest-fetch-mock as dev dependency (#528) 2018-07-26 15:08:14 -07:00
RemoveBuildDirectoryPlugin.js Refine the build directory cleaning logic (#577) 2018-07-31 15:27:32 -07:00
babel.js Save the GitHub relational store from the CLI (#447) 2018-06-29 12:12:37 -07:00
env.js Turn on flow for config/env.js (#243) 2018-05-08 14:56:06 -07:00
makeWebpackConfig.js Use relative paths for lexically static assets (#671) 2018-08-15 15:30:23 -07:00
paths.js Add a favicon (#637) 2018-08-10 13:15:49 -07:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
test.js Add `sharness` for shell-based testing (#597) 2018-08-06 12:56:25 -07:00
webpack.config.backend.js Don’t erase the `bin/` folder in CI (#317) 2018-05-29 15:40:42 -07:00