Skip to content

Commit 53eb58d

Browse files
committed
conf: add json file path
1 parent ada8cef commit 53eb58d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

videochat-conf/webpack.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ const path = require("path");
33
const webpack = require('webpack')
44
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
55
const CopyWebpackPlugin = require("copy-webpack-plugin");
6-
let cubeConfigJSON = void 0
76

8-
if (fs.existsSync('./cubeConfig.json')) {
9-
cubeConfigJSON = require('./cubeConfig.json')
10-
}
7+
const configJSONPath = path.join(__dirname, 'cubeConfig.json')
8+
const cubeConfigJSON = fs.existsSync(configJSONPath) ? require(configJSONPath) : void 0
119

1210
module.exports = env => ({
1311
mode: env.production ? "production" : "development",

0 commit comments

Comments
 (0)