add default SDK_API_URL to webpack web build
This commit is contained in:
parent
3e556e505c
commit
07bf3f4916
3 changed files with 3 additions and 5 deletions
|
@ -1,7 +1,5 @@
|
|||
const { LBRY_TV_API } = require('../../../config');
|
||||
|
||||
function generateStreamUrl(claimName, claimId) {
|
||||
const prefix = process.env.SDK_API_URL || LBRY_TV_API;
|
||||
const prefix = process.env.SDK_API_URL;
|
||||
return `${prefix}/content/claims/${claimName}/${claimId}/stream`;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,6 @@ let baseConfig = {
|
|||
new DefinePlugin({
|
||||
__static: `"${path.join(__dirname, 'static').replace(/\\/g, '\\\\')}"`,
|
||||
'process.env.NODE_ENV': JSON.stringify(NODE_ENV),
|
||||
'process.env.SDK_API_URL': JSON.stringify(process.env.SDK_API_URL),
|
||||
'process.env.LBRY_API_URL': JSON.stringify(process.env.LBRY_API_URL),
|
||||
}),
|
||||
],
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
const { WEBPACK_WEB_PORT } = require('./config.js');
|
||||
const { WEBPACK_WEB_PORT, LBRY_TV_API } = require('./config.js');
|
||||
const path = require('path');
|
||||
const merge = require('webpack-merge');
|
||||
const baseConfig = require('./webpack.base.config.js');
|
||||
|
@ -69,6 +69,7 @@ const webConfig = {
|
|||
]),
|
||||
new DefinePlugin({
|
||||
IS_WEB: JSON.stringify(true),
|
||||
'process.env.SDK_API_URL': JSON.stringify(process.env.SDK_API_URL || LBRY_TV_API),
|
||||
}),
|
||||
new ProvidePlugin({
|
||||
__: ['i18n.js', '__'],
|
||||
|
|
Loading…
Reference in a new issue