diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-10 05:26:05 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-10 05:26:05 +0800 |
commit | c8bb21d12d6acb3fa76a8d3b22b1cbab3ea63ef8 (patch) | |
tree | 8a1e66563b1f91558a5c2ce978e5f6aad4017ad6 /packages/website/webpack.config.js | |
parent | e817cd7d43467678f3dec7c020f8f0348bfc137b (diff) | |
download | dexon-0x-contracts-c8bb21d12d6acb3fa76a8d3b22b1cbab3ea63ef8.tar.gz dexon-0x-contracts-c8bb21d12d6acb3fa76a8d3b22b1cbab3ea63ef8.tar.zst dexon-0x-contracts-c8bb21d12d6acb3fa76a8d3b22b1cbab3ea63ef8.zip |
Add sourcemaps for rollbar
Diffstat (limited to 'packages/website/webpack.config.js')
-rw-r--r-- | packages/website/webpack.config.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index b5e9cf6dd..1326769e3 100644 --- a/packages/website/webpack.config.js +++ b/packages/website/webpack.config.js @@ -1,6 +1,13 @@ const path = require('path'); const webpack = require('webpack'); const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); +const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin'); +const childProcess = require('child_process'); + +const GIT_SHA = childProcess + .execSync('git rev-parse HEAD') + .toString() + .trim(); module.exports = { entry: ['./ts/index.tsx'], @@ -80,6 +87,7 @@ module.exports = { new webpack.DefinePlugin({ 'process.env': { NODE_ENV: JSON.stringify(process.env.NODE_ENV), + GIT_SHA: GIT_SHA, }, }), // TODO: Revert to webpack bundled version with webpack v4. @@ -92,6 +100,11 @@ module.exports = { }, }, }), + new RollbarSourceMapPlugin({ + accessToken: 'a6619002b51c4464928201e6ea94de65', + version: GIT_SHA, + publicPath: 'https://0xproject.com/', + }), ] : [], }; |