From 26402d240a47ab332aff3dced897a56bc7bc8777 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Tue, 5 Mar 2019 12:54:11 -0500 Subject: [PATCH] fix web build --- package.json | 1 - src/ui/component/walletAddress/view.jsx | 4 +--- src/ui/i18n/index.js | 2 ++ src/ui/index.js | 2 +- static/index.dev.html | 4 ---- static/index.html | 4 ---- webpack.base.config.js | 1 - webpack.electron.config.js | 18 +++++++++--------- webpack.web.config.js | 2 +- 9 files changed, 14 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index a3d795f0b..47dd3f721 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,6 @@ "render-media": "^3.1.0", "reselect": "^3.0.0", "semver": "^5.3.0", - "source-map-support": "^0.5.10", "stream-to-blob-url": "^2.1.1", "three": "^0.93.0", "three-full": "^11.3.2", diff --git a/src/ui/component/walletAddress/view.jsx b/src/ui/component/walletAddress/view.jsx index 8fbbde816..5fcf0731c 100644 --- a/src/ui/component/walletAddress/view.jsx +++ b/src/ui/component/walletAddress/view.jsx @@ -24,7 +24,7 @@ class WalletAddress extends React.PureComponent { showQR: false, }; - this.toggleQR = this.toggleQR.bind(this); + (this: any).toggleQR = this.toggleQR.bind(this); } componentWillMount() { @@ -36,8 +36,6 @@ class WalletAddress extends React.PureComponent { } } - toggleQR: Function; - toggleQR() { this.setState({ showQR: !this.state.showQR, diff --git a/src/ui/i18n/index.js b/src/ui/i18n/index.js index 216641d3b..9414d2261 100644 --- a/src/ui/i18n/index.js +++ b/src/ui/i18n/index.js @@ -11,6 +11,8 @@ const i18n = y18n({ const i18n = { setLocale: () => {}, getLocale: () => {}, + __: x => x, + __n: x => x, }; // @endif diff --git a/src/ui/index.js b/src/ui/index.js index 9b9fc94bf..12eaf8b59 100644 --- a/src/ui/index.js +++ b/src/ui/index.js @@ -61,7 +61,7 @@ ipcRenderer.on('navigate-forward', () => { // @endif // @if TARGET='web' -Lbry.setDaemonConnectionString('/api/proxy'); +Lbry.setDaemonConnectionString('https://beta.lbry.tv/api/proxy'); // @endif // We need to override Lbryio for getting/setting the authToken diff --git a/static/index.dev.html b/static/index.dev.html index 91284276a..6fd2defc2 100644 --- a/static/index.dev.html +++ b/static/index.dev.html @@ -2,10 +2,6 @@ - - diff --git a/static/index.html b/static/index.html index 3082653c0..e5150b832 100644 --- a/static/index.html +++ b/static/index.html @@ -2,10 +2,6 @@ - - diff --git a/webpack.base.config.js b/webpack.base.config.js index 52f80bfc7..4dadb31ce 100644 --- a/webpack.base.config.js +++ b/webpack.base.config.js @@ -67,7 +67,6 @@ const baseConfig = { __static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`, }), ], - externals: [nodeExternals()], }; module.exports = baseConfig; diff --git a/webpack.electron.config.js b/webpack.electron.config.js index 07e1b4ccf..1ae4fd73d 100644 --- a/webpack.electron.config.js +++ b/webpack.electron.config.js @@ -6,7 +6,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin'); const STATIC_ROOT = path.resolve(__dirname, 'static/'); const DIST_ROOT = path.resolve(__dirname, 'dist/'); - const mainConfig = { target: 'electron-main', entry: { @@ -41,7 +40,7 @@ const mainConfig = { resolve: { alias: { // 'src/electron': path.resolve(__dirname, 'src/platforms/electron'); - } + }, }, plugins: [ new CopyWebpackPlugin([ @@ -57,7 +56,7 @@ const mainConfig = { ]), ], devServer: { - contentBase: path.join(__dirname, 'dist/electron') + contentBase: path.join(__dirname, 'dist/electron'), }, }; @@ -95,24 +94,25 @@ const renderConfig = { resolve: { alias: { // 'src/electron': path.resolve(__dirname, 'src/platforms/electron'); - } + }, }, plugins: [ new CopyWebpackPlugin([ { from: `${STATIC_ROOT}/`, to: `${DIST_ROOT}/electron/static/`, - ignore: ['font/**/*', 'index.html'], + ignore: ['font/**/*', 'index.html', 'index.dev.html'], }, { from: `${STATIC_ROOT}/index.html`, to: `${DIST_ROOT}/electron/index.html`, }, + { + from: `${STATIC_ROOT}/index.dev.html`, + to: `${DIST_ROOT}/electron/index.dev.html`, + }, ]), ], }; -module.exports = [ - merge(baseConfig, mainConfig), - merge(baseConfig, renderConfig), -]; +module.exports = [merge(baseConfig, mainConfig), merge(baseConfig, renderConfig)]; diff --git a/webpack.web.config.js b/webpack.web.config.js index 8e291930a..1823241cf 100644 --- a/webpack.web.config.js +++ b/webpack.web.config.js @@ -12,7 +12,7 @@ const webConfig = { ui: './src/ui/index.js', }, output: { - filename: 'bundle.js', + filename: '[name].js', path: __dirname + '/dist/web', }, module: {