mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
refactor: silence saas deprecations on prod
This commit is contained in:
@@ -160,9 +160,13 @@ Minifier.js.bundle = async function (data, fork) {
|
|||||||
actions.buildCSS = async function buildCSS(data) {
|
actions.buildCSS = async function buildCSS(data) {
|
||||||
let css = '';
|
let css = '';
|
||||||
try {
|
try {
|
||||||
const scssOutput = await sass.compileStringAsync(data.source, {
|
const opts = {
|
||||||
loadPaths: data.paths,
|
loadPaths: data.paths,
|
||||||
});
|
};
|
||||||
|
if (data.minify) {
|
||||||
|
opts.silenceDeprecations = ['mixed-decls'];
|
||||||
|
}
|
||||||
|
const scssOutput = await sass.compileStringAsync(data.source, opts);
|
||||||
css = scssOutput.css.toString();
|
css = scssOutput.css.toString();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err.stack);
|
console.error(err.stack);
|
||||||
|
|||||||
Reference in New Issue
Block a user