Files
meteor/tools/tests/apps/custom-minifier/code.js
zodern 35dd7ab257 Pass lazy css resources to minifier in dev
This makes it consistent with non-lazy css resources, which were always being passed to the minifier.
2022-02-08 19:20:57 -06:00

27 lines
750 B
JavaScript

if (Meteor.isClient) {
require('./imports/imported.css');
Meteor.startup(function () {
['production_css', 'development_css', 'minified_lazy'].forEach(cls => {
var color = getComputedStyle(document.querySelectorAll('.' + cls)[0]).color;
Meteor.call('print', cls + ': ' + color);
});
// this log is expected to be transformed by minifier
Meteor.call('print', 'Message (client): foo');
});
} else {
Meteor.startup(function () {
// since we don't run minifiers for server targets, this is going
// to be printed as "foo" and not as "production_js" or
// "development_js"
console.log('Message: foo');
});
Meteor.methods({
print: function (message) {
console.log(message);
}
});
}