mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-26 12:30:20 +00:00
Use route data for static site source of truth
Summary: This removes the hard-coded route data from the Webpack config, replacing it with the list of paths exported by the route data module. Test Plan: Note that the output of `yarn build` is identical before and after this change: namely, ```shell $ find build -exec shasum -a 256 {} + | shasum -a 256 7610a61f8a977f1d8edd849fc81256ca15f41f366e5fdb4b59a5d5ce37d6d58e ``` wchargin-branch: non-hard-coded-route-data
This commit is contained in:
parent
73e36b2ab2
commit
9a356f88a1
@ -40,6 +40,7 @@ module.exports = {
|
||||
appHtml: resolveApp("src/app/public/index.html"),
|
||||
appIndexJs: resolveApp("src/app/index.js"),
|
||||
appServerSideRenderingIndexJs: resolveApp("src/app/server.js"),
|
||||
appRouteData: resolveApp("src/app/routeData.js"),
|
||||
appPackageJson: resolveApp("package.json"),
|
||||
appSrc: resolveApp("src"),
|
||||
yarnLockFile: resolveApp("yarn.lock"),
|
||||
|
@ -164,7 +164,7 @@ module.exports = {
|
||||
plugins: [
|
||||
new StaticSiteGeneratorPlugin({
|
||||
entry: "ssr",
|
||||
paths: /* TODO(@wchargin): Non-hard-coded routes */ ["/", "/explorer"],
|
||||
paths: require(paths.appRouteData).routeData.map(({path}) => path),
|
||||
locals: {},
|
||||
}),
|
||||
// Makes some environment variables available to the JS code, for example:
|
||||
|
Loading…
x
Reference in New Issue
Block a user