compress bundled js

This commit is contained in:
AlecM33
2023-03-11 17:07:31 -05:00
parent ed7beb50a5
commit e0986cefde
16 changed files with 223 additions and 25 deletions

View File

@@ -139,6 +139,13 @@ const ServerBootstrapper = {
const router = require('../routes/router');
app.use('', router);
app.use('/dist', (req, res, next) => {
if (req.url !== '/521-bundle.js') {
res.set('Content-Encoding', 'gzip');
}
next();
});
app.use('/dist', express.static(path.join(__dirname, '../../client/dist')));
// set up routing for static content that isn't being bundled.