fix web build
This commit is contained in:
parent
88ed4ffd36
commit
26402d240a
9 changed files with 14 additions and 24 deletions
|
@ -90,7 +90,6 @@
|
||||||
"render-media": "^3.1.0",
|
"render-media": "^3.1.0",
|
||||||
"reselect": "^3.0.0",
|
"reselect": "^3.0.0",
|
||||||
"semver": "^5.3.0",
|
"semver": "^5.3.0",
|
||||||
"source-map-support": "^0.5.10",
|
|
||||||
"stream-to-blob-url": "^2.1.1",
|
"stream-to-blob-url": "^2.1.1",
|
||||||
"three": "^0.93.0",
|
"three": "^0.93.0",
|
||||||
"three-full": "^11.3.2",
|
"three-full": "^11.3.2",
|
||||||
|
|
|
@ -24,7 +24,7 @@ class WalletAddress extends React.PureComponent<Props, State> {
|
||||||
showQR: false,
|
showQR: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.toggleQR = this.toggleQR.bind(this);
|
(this: any).toggleQR = this.toggleQR.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
|
@ -36,8 +36,6 @@ class WalletAddress extends React.PureComponent<Props, State> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleQR: Function;
|
|
||||||
|
|
||||||
toggleQR() {
|
toggleQR() {
|
||||||
this.setState({
|
this.setState({
|
||||||
showQR: !this.state.showQR,
|
showQR: !this.state.showQR,
|
||||||
|
|
|
@ -11,6 +11,8 @@ const i18n = y18n({
|
||||||
const i18n = {
|
const i18n = {
|
||||||
setLocale: () => {},
|
setLocale: () => {},
|
||||||
getLocale: () => {},
|
getLocale: () => {},
|
||||||
|
__: x => x,
|
||||||
|
__n: x => x,
|
||||||
};
|
};
|
||||||
// @endif
|
// @endif
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ ipcRenderer.on('navigate-forward', () => {
|
||||||
// @endif
|
// @endif
|
||||||
|
|
||||||
// @if TARGET='web'
|
// @if TARGET='web'
|
||||||
Lbry.setDaemonConnectionString('/api/proxy');
|
Lbry.setDaemonConnectionString('https://beta.lbry.tv/api/proxy');
|
||||||
// @endif
|
// @endif
|
||||||
|
|
||||||
// We need to override Lbryio for getting/setting the authToken
|
// We need to override Lbryio for getting/setting the authToken
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|
||||||
<script>
|
|
||||||
require('source-map-support/source-map-support.js').install();
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
|
|
||||||
<script>
|
|
||||||
require('source-map-support/source-map-support.js').install();
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -67,7 +67,6 @@ const baseConfig = {
|
||||||
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,
|
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
externals: [nodeExternals()],
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = baseConfig;
|
module.exports = baseConfig;
|
||||||
|
|
|
@ -6,7 +6,6 @@ const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
const STATIC_ROOT = path.resolve(__dirname, 'static/');
|
||||||
const DIST_ROOT = path.resolve(__dirname, 'dist/');
|
const DIST_ROOT = path.resolve(__dirname, 'dist/');
|
||||||
|
|
||||||
|
|
||||||
const mainConfig = {
|
const mainConfig = {
|
||||||
target: 'electron-main',
|
target: 'electron-main',
|
||||||
entry: {
|
entry: {
|
||||||
|
@ -41,7 +40,7 @@ const mainConfig = {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
// 'src/electron': path.resolve(__dirname, 'src/platforms/electron');
|
// 'src/electron': path.resolve(__dirname, 'src/platforms/electron');
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
|
@ -57,7 +56,7 @@ const mainConfig = {
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
devServer: {
|
devServer: {
|
||||||
contentBase: path.join(__dirname, 'dist/electron')
|
contentBase: path.join(__dirname, 'dist/electron'),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -95,24 +94,25 @@ const renderConfig = {
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
// 'src/electron': path.resolve(__dirname, 'src/platforms/electron');
|
// 'src/electron': path.resolve(__dirname, 'src/platforms/electron');
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
{
|
{
|
||||||
from: `${STATIC_ROOT}/`,
|
from: `${STATIC_ROOT}/`,
|
||||||
to: `${DIST_ROOT}/electron/static/`,
|
to: `${DIST_ROOT}/electron/static/`,
|
||||||
ignore: ['font/**/*', 'index.html'],
|
ignore: ['font/**/*', 'index.html', 'index.dev.html'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
from: `${STATIC_ROOT}/index.html`,
|
from: `${STATIC_ROOT}/index.html`,
|
||||||
to: `${DIST_ROOT}/electron/index.html`,
|
to: `${DIST_ROOT}/electron/index.html`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
from: `${STATIC_ROOT}/index.dev.html`,
|
||||||
|
to: `${DIST_ROOT}/electron/index.dev.html`,
|
||||||
|
},
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = [
|
module.exports = [merge(baseConfig, mainConfig), merge(baseConfig, renderConfig)];
|
||||||
merge(baseConfig, mainConfig),
|
|
||||||
merge(baseConfig, renderConfig),
|
|
||||||
];
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ const webConfig = {
|
||||||
ui: './src/ui/index.js',
|
ui: './src/ui/index.js',
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: 'bundle.js',
|
filename: '[name].js',
|
||||||
path: __dirname + '/dist/web',
|
path: __dirname + '/dist/web',
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
|
|
Loading…
Reference in a new issue