aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/scripts/start.js
diff options
context:
space:
mode:
authorStas Vilchik <vilchiks@gmail.com>2016-11-28 18:13:00 +0100
committerStas Vilchik <vilchiks@gmail.com>2016-12-07 14:36:18 +0100
commit673b03c6f68593f4e27675e709f2ce20831e0d98 (patch)
tree30ee597d3a3e1a0bcf5eff9a7859d1084c32d435 /server/sonar-web/scripts/start.js
parenta2d0b4ee581e86b474a47e16095e7500c404e37d (diff)
downloadsonarqube-673b03c6f68593f4e27675e709f2ce20831e0d98.tar.gz
sonarqube-673b03c6f68593f4e27675e709f2ce20831e0d98.zip
SONAR-8448 generate index.html during the build
Diffstat (limited to 'server/sonar-web/scripts/start.js')
-rw-r--r--server/sonar-web/scripts/start.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/server/sonar-web/scripts/start.js b/server/sonar-web/scripts/start.js
index 67b239a4739..c0ee1f90fe1 100644
--- a/server/sonar-web/scripts/start.js
+++ b/server/sonar-web/scripts/start.js
@@ -45,19 +45,6 @@ var handleCompile;
var PROXY_URL = 'http://localhost:9000';
-// You can safely remove this after ejecting.
-// We only use this block for testing of Create React App itself:
-var isSmokeTest = process.argv.some(arg => arg.indexOf('--smoke-test') > -1);
-if (isSmokeTest) {
- handleCompile = function (err, stats) {
- if (err || stats.hasErrors() || stats.hasWarnings()) {
- process.exit(1);
- } else {
- process.exit(0);
- }
- };
-}
-
function setupCompiler (host, port, protocol) {
// "Compiler" is a low-level interface to Webpack.
// It lets us listen to some events and provide our own custom messages.
@@ -181,7 +168,7 @@ function addMiddleware (devServer) {
// - /*.hot-update.json (WebpackDevServer uses this too for hot reloading)
// - /sockjs-node/* (WebpackDevServer uses this for hot reloading)
// Tip: use https://jex.im/regulex/ to visualize the regex
- var mayProxy = /^(?!\/(.*\.hot-update\.json$|sockjs-node\/)).*$/;
+ var mayProxy = /^(?!\/(index\.html$|.*\.hot-update\.json$|sockjs-node\/)).*$/;
devServer.use(mayProxy,
// Pass the scope regex both to Express and to the middleware for proxying
// of both HTTP and WebSockets to work without false positives.
@@ -201,6 +188,8 @@ function addMiddleware (devServer) {
function runDevServer (host, port, protocol) {
var devServer = new WebpackDevServer(compiler, {
+ // Enable gzip compression of generated files.
+ compress: true,
// Silence WebpackDevServer's own logs since they're generally not useful.
// It will still show compile warnings and errors with this setting.
clientLogLevel: 'none',