mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 15:57:50 +01:00
compress bundled js
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user