diff --git a/config/env.js b/config/env.js index 99308c5af..94300db39 100644 --- a/config/env.js +++ b/config/env.js @@ -3,6 +3,8 @@ const fs = require('fs'); const path = require('path'); const paths = require('./paths'); +const dotenvExpand = require('dotenv-expand'); +const dotenv = require('dotenv') // Make sure that including paths.js after env.js will read .env variables. delete require.cache[require.resolve('./paths')]; @@ -32,11 +34,8 @@ const dotenvFiles = [ // https://github.com/motdotla/dotenv-expand dotenvFiles.forEach(dotenvFile => { if (fs.existsSync(dotenvFile)) { - require('dotenv-expand')( - require('dotenv').config({ - path: dotenvFile - }) - ); + dotenvFile = dotenv.config({ path: dotenvFile}); + dotenvExpand.expand(dotenvFile); } }); diff --git a/config/webpack.config.js b/config/webpack.config.js index c6dccfdca..3263c9947 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -417,7 +417,7 @@ module.exports = function (webpackEnv) { maxChunks: 1 }), new MonacoWebpackPlugin({ - languages: ['json', 'javascript', 'java', 'objective-c', 'csharp', 'html', 'powershell', 'go'] + languages: ['json', 'javascript', 'java', 'csharp', 'html', 'powershell', 'go'] }), // Generates an `index.html` file with the