Merge pull request #1038 from mozilla/fix-npm-run-android
Fix npm run android by removing the <base href> when running under the dev server
This commit is contained in:
commit
8cde99d2a2
|
@ -18,9 +18,10 @@ module.exports = function(app, devServer) {
|
|||
assets.setMiddleware(devServer.middleware);
|
||||
app.use(morgan('dev', { stream: process.stderr }));
|
||||
function android(req, res) {
|
||||
const index = devServer.middleware.fileSystem.readFileSync(
|
||||
devServer.middleware.getFilenameFromUrl('/android.html')
|
||||
);
|
||||
const index = devServer.middleware.fileSystem
|
||||
.readFileSync(devServer.middleware.getFilenameFromUrl('/android.html'))
|
||||
.toString()
|
||||
.replace('<base href="file:///android_asset/" />', '');
|
||||
res.set('Content-Type', 'text/html');
|
||||
res.send(index);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue