Merge pull request #1086 from mozilla/fix-android-equals-1-npm-start

Make ANDROID=1 npm start work again, as it broke at some point
This commit is contained in:
Danny Coates 2019-01-10 15:04:27 -08:00 committed by GitHub
commit 742b97cb4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,10 @@ module.exports = function(app, devServer) {
const index = devServer.middleware.fileSystem
.readFileSync(devServer.middleware.getFilenameFromUrl('/android.html'))
.toString()
.replace('<base href="file:///android_asset/" />', '');
.replace(
'<base href="file:///android_asset/" />',
'<base href="http://localhost:8080/" />'
);
res.set('Content-Type', 'text/html');
res.send(index);
}
@ -30,7 +33,6 @@ module.exports = function(app, devServer) {
app.get('/', android);
app.get('/legal', android);
app.get(`/share/:id${ID_REGEX}`, android);
app.get(`/download/:id${ID_REGEX}`, android);
app.get('/completed', android);
app.get('/preferences', android);
app.get('/options', android);