@ -1,7 +1,7 @@
import { Socket } from 'phoenix'
import { locale } from './locale'
const socket = new Socket(process.env.SOCKET_ROOT + '/socket', { params: { locale: locale } })
const socket = new Socket((process.env.SOCKET_ROOT || '') + '/socket', { params: { locale: locale } })
socket.connect()
export default socket
@ -139,7 +139,7 @@ const appJs =
new CopyWebpackPlugin([{ from: 'static/', to: '../' }]),
new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/),
new webpack.DefinePlugin({
'process.env.SOCKET_ROOT': JSON.stringify(process.env.SOCKET_ROOT || '')
'process.env.SOCKET_ROOT': JSON.stringify(process.env.SOCKET_ROOT)
})
]
}