sourcecred/config
William Chargin 8ed0585bb6
api: extract browser-friendly build target (#1536)
Summary:
This re-packages the build for the internal APIs exposed under #1526 to
be more browser-friendly. Removing `target: "node"` (and adding an
explicit `globalObject: "this"` for best-effort cross-compatibility) is
the biggest change from the backend build; removing all the extra
loaders and static site generation is the biggest change from the
frontend build.

This build configuration is forked from `webpack.config.backend.js`.

Test Plan:
Run `yarn api`, then upload the contents of `dist/api.js` to an
Observable notebook and require it as an ES module. Verify that the
SourceCred APIs are exposed: e.g., `sourcecred.core.graph.Graph` should
be a valid constructor.

wchargin-branch: api-build
2020-01-09 21:27:37 -08:00
..
jest flow: add typing to Jest transform modules (#790) 2018-09-06 13:30:33 -07:00
RemoveBuildDirectoryPlugin.js upgrade to webpack 4 2019-07-11 05:52:54 +01:00
env.js Remove the repoIdRegistry (#1534) 2020-01-08 12:58:04 -08:00
paths.js api: extract browser-friendly build target (#1536) 2020-01-09 21:27:37 -08:00
polyfills.js Ensure that flow is used in all js files (#232) 2018-05-07 20:02:19 -07:00
test.js ci: fast-fail on forked PRs with no credentials (#1522) 2020-01-07 21:03:23 -08:00
webpack.config.api.js api: extract browser-friendly build target (#1536) 2020-01-09 21:27:37 -08:00
webpack.config.backend.js upgrade to webpack 4 2019-07-11 05:52:54 +01:00
webpack.config.web.js Remove the repoIdRegistry (#1534) 2020-01-08 12:58:04 -08:00