diff options
author | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-25 16:53:22 +0200 |
---|---|---|
committer | Stas Vilchik <stas.vilchik@sonarsource.com> | 2017-10-30 09:20:37 +0100 |
commit | e4ef72e885308b113d89a7826d1b300c093134cf (patch) | |
tree | d747d066447c0924cf2cfb108bf107a8effd0144 /server/sonar-web/scripts | |
parent | eea79d51b8894ef98f1cd02388d06062df343e4d (diff) | |
download | sonarqube-e4ef72e885308b113d89a7826d1b300c093134cf.tar.gz sonarqube-e4ef72e885308b113d89a7826d1b300c093134cf.zip |
update web dependencies (#2752)
Diffstat (limited to 'server/sonar-web/scripts')
-rw-r--r-- | server/sonar-web/scripts/analyze.js | 2 | ||||
-rw-r--r-- | server/sonar-web/scripts/start.js | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/server/sonar-web/scripts/analyze.js b/server/sonar-web/scripts/analyze.js index dd1121b38c2..c821eb19790 100644 --- a/server/sonar-web/scripts/analyze.js +++ b/server/sonar-web/scripts/analyze.js @@ -21,7 +21,7 @@ process.env.NODE_ENV = 'production'; const webpack = require('webpack'); -const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; +const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer'); const getConfig = require('../config/webpack.config'); const config = getConfig({ production: true }); diff --git a/server/sonar-web/scripts/start.js b/server/sonar-web/scripts/start.js index c34df111987..21776e5036b 100644 --- a/server/sonar-web/scripts/start.js +++ b/server/sonar-web/scripts/start.js @@ -72,7 +72,6 @@ function setupCompiler(host, port, protocol) { console.log(message); console.log(); }); - return; } }); @@ -81,6 +80,14 @@ function setupCompiler(host, port, protocol) { function runDevServer(compiler, host, port, protocol) { const devServer = new WebpackDevServer(compiler, { + before(app) { + app.use(errorOverlayMiddleware()); + app.get('/api/l10n/index', (req, res) => { + getMessages() + .then(messages => res.json({ effectiveLocale: 'en', messages })) + .catch(() => res.status(500)); + }); + }, compress: true, clientLogLevel: 'none', contentBase: paths.appPublic, @@ -102,18 +109,13 @@ function runDevServer(compiler, host, port, protocol) { '/fonts': proxy, '/images': proxy, '/static': proxy - }, - setup(app) { - app.use(errorOverlayMiddleware()); - app.get('/api/l10n/index', (req, res) => { - getMessages().then(messages => res.json({ effectiveLocale: 'en', messages })); - }); } }); devServer.listen(port, err => { if (err) { - return console.log(err); + console.log(err); + return; } clearConsole(); |