diff options
Diffstat (limited to 'packages/website')
-rw-r--r-- | packages/website/package.json | 1 | ||||
-rw-r--r-- | packages/website/ts/components/portal/menu.tsx | 4 | ||||
-rw-r--r-- | packages/website/ts/components/portal/portal.tsx | 4 | ||||
-rw-r--r-- | packages/website/webpack.config.js | 12 |
4 files changed, 14 insertions, 7 deletions
diff --git a/packages/website/package.json b/packages/website/package.json index 3ef66d269..8b34cd743 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -88,6 +88,7 @@ "tslint": "5.8.0", "tslint-config-0xproject": "^0.0.2", "typescript": "2.7.1", + "uglifyjs-webpack-plugin": "^1.2.5", "webpack": "^3.1.0", "webpack-dev-middleware": "^1.10.0", "webpack-dev-server": "^2.5.0" diff --git a/packages/website/ts/components/portal/menu.tsx b/packages/website/ts/components/portal/menu.tsx index e8353a3b0..6a3301549 100644 --- a/packages/website/ts/components/portal/menu.tsx +++ b/packages/website/ts/components/portal/menu.tsx @@ -61,13 +61,13 @@ export const Menu: React.StatelessComponent<MenuProps> = (props: MenuProps) => { return ( <div> {_.map(props.menuItemEntries, entry => { - const selected = entry.to === props.selectedPath; + const isSelected = entry.to === props.selectedPath; return ( <MenuItem key={entry.to} to={entry.to}> <MenuItemLabel title={entry.labelText} iconName={entry.iconName} - selected={selected} + selected={isSelected} theme={props.theme} /> </MenuItem> diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index b992204a7..1bd318c28 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -466,8 +466,8 @@ export class Portal extends React.Component<PortalProps, PortalState> { this.props.dispatcher.updateScreenWidth(newScreenWidth); } private _isSmallScreen(): boolean { - const result = this.props.screenWidth === ScreenWidths.Sm; - return result; + const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; + return isSmallScreen; } } diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js index e28e9e064..f9abeb27c 100644 --- a/packages/website/webpack.config.js +++ b/packages/website/webpack.config.js @@ -1,5 +1,6 @@ const path = require('path'); const webpack = require('webpack'); +const UglifyJsPlugin = require('uglifyjs-webpack-plugin') module.exports = { entry: ['./ts/index.tsx'], @@ -76,9 +77,14 @@ module.exports = { NODE_ENV: JSON.stringify(process.env.NODE_ENV), }, }), - new webpack.optimize.UglifyJsPlugin({ - mangle: { - except: ['BigNumber'], + // TODO: Revert to webpack bundled version with webpack v4. + // The v3 series bundled version does not support ES6 and + // fails to build. + new UglifyJsPlugin({ + uglifyOptions: { + mangle: { + reserved: ['BigNumber'], + }, }, }), ] |