D
D
DaniilKhanin2017-08-30 17:48:47
css
DaniilKhanin, 2017-08-30 17:48:47

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');
});

when you open localhost:3000 , bundle.js uploads the correct one, and js on the page works, regarding css it also uploads it but it doesn't apply ...
If anyone has encountered such a problem, please help ...

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question