Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions _scripts/webpack.main.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
const path = require('path')
const webpack = require('webpack')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const JsonMinimizerPlugin = require('json-minimizer-webpack-plugin')

const { productName } = require('../package.json')

const isDevMode = process.env.NODE_ENV === 'development'

const config = {
Expand Down Expand Up @@ -36,11 +33,7 @@ const config = {
__dirname: isDevMode,
__filename: isDevMode
},
plugins: [
new webpack.DefinePlugin({
'process.env.PRODUCT_NAME': JSON.stringify(productName),
}),
],
plugins: [],
output: {
filename: '[name].js',
libraryTarget: 'commonjs2',
Expand Down
3 changes: 0 additions & 3 deletions _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const ProcessLocalesPlugin = require('./ProcessLocalesPlugin')

const { productName } = require('../package.json')

const isDevMode = process.env.NODE_ENV === 'development'

const config = {
Expand Down Expand Up @@ -110,7 +108,6 @@ const config = {
},
plugins: [
new webpack.DefinePlugin({
'process.env.PRODUCT_NAME': JSON.stringify(productName),
'process.env.IS_ELECTRON': true
}),
new HtmlWebpackPlugin({
Expand Down
3 changes: 0 additions & 3 deletions _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ const JsonMinimizerPlugin = require('json-minimizer-webpack-plugin')
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin')
const ProcessLocalesPlugin = require('./ProcessLocalesPlugin')

const { productName } = require('../package.json')

const isDevMode = process.env.NODE_ENV === 'development'

const config = {
Expand Down Expand Up @@ -114,7 +112,6 @@ const config = {
},
plugins: [
new webpack.DefinePlugin({
'process.env.PRODUCT_NAME': JSON.stringify(productName),
'process.env.IS_ELECTRON': false
}),
new webpack.ProvidePlugin({
Expand Down
6 changes: 3 additions & 3 deletions src/renderer/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ export default Vue.extend({
if (this.$route.meta.title !== 'Channel' && this.$route.meta.title !== 'Watch') {
let title =
this.$route.meta.path === '/home'
? process.env.PRODUCT_NAME
: `${this.$t(this.$route.meta.title)} - ${process.env.PRODUCT_NAME}`
? packageDetails.productName
: `${this.$t(this.$route.meta.title)} - ${packageDetails.productName}`
if (!title) {
title = process.env.PRODUCT_NAME
title = packageDetails.productName
}
return title
} else {
Expand Down
5 changes: 3 additions & 2 deletions src/renderer/views/Channel/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import autolinker from 'autolinker'
import { MAIN_PROFILE_ID } from '../../../constants'
import i18n from '../../i18n/index'
import { copyToClipboard, showToast } from '../../helpers/utils'
import packageDetails from '../../../../package.json'

export default Vue.extend({
name: 'Search',
Expand Down Expand Up @@ -273,7 +274,7 @@ export default Vue.extend({
this.idType = 1
this.channelName = channelName
this.isFamilyFriendly = response.isFamilyFriendly
document.title = `${this.channelName} - ${process.env.PRODUCT_NAME}`
document.title = `${this.channelName} - ${packageDetails.productName}`
if (this.hideChannelSubscriptions || response.subscriberCount === 0) {
this.subCount = null
} else {
Expand Down Expand Up @@ -373,7 +374,7 @@ export default Vue.extend({
const channelName = response.author
const channelId = response.authorId
this.channelName = channelName
document.title = `${this.channelName} - ${process.env.PRODUCT_NAME}`
document.title = `${this.channelName} - ${packageDetails.productName}`
this.id = channelId
this.isFamilyFriendly = response.isFamilyFriendly
if (this.hideChannelSubscriptions) {
Expand Down