fix web build

This commit is contained in:
Sean Yesmunt 2019-03-05 12:54:11 -05:00
parent 88ed4ffd36
commit 26402d240a
9 changed files with 14 additions and 24 deletions

View file

@ -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",

View file

@ -24,7 +24,7 @@ class WalletAddress extends React.PureComponent<Props, State> {
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<Props, State> {
}
}
toggleQR: Function;
toggleQR() {
this.setState({
showQR: !this.state.showQR,

View file

@ -11,6 +11,8 @@ const i18n = y18n({
const i18n = {
setLocale: () => {},
getLocale: () => {},
__: x => x,
__n: x => x,
};
// @endif

View file

@ -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

View file

@ -2,10 +2,6 @@
<html>
<head>
<meta charset="utf-8" />
<script>
require('source-map-support/source-map-support.js').install();
</script>
</head>
<body>

View file

@ -2,10 +2,6 @@
<html>
<head>
<meta charset="utf-8" />
<script>
require('source-map-support/source-map-support.js').install();
</script>
</head>
<body>

View file

@ -67,7 +67,6 @@ const baseConfig = {
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,
}),
],
externals: [nodeExternals()],
};
module.exports = baseConfig;

View file

@ -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)];

View file

@ -12,7 +12,7 @@ const webConfig = {
ui: './src/ui/index.js',
},
output: {
filename: 'bundle.js',
filename: '[name].js',
path: __dirname + '/dist/web',
},
module: {