Answer the question
In order to leave comments, you need to log in
How to include compressed brootlin styles?
Compressed css && js bundle, via BrotliPlugin, serv.js has the following code,
...
// использую express
app.get('*.js', function (req, res, next) {
req.url = req.url + '.br';
res.set('Content-Encoding', 'br');
next();
});
// @TODO не работают стили ...
/*
app.get('*.css', function (req, res, next) {
req.url = req.url + '.br';
res.set('Content-Encoding', 'br');
next();
});
*/
app.use(webpackDevMiddleware(compiler));
app.listen(3000, function () {
console.log('Example app listening on port 3000!\n');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question