You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
I am guessing this is user error on my part. But could someone take a look at this? I want to replace the css and js includes with custom text, not the out-of-the-box. Here is a snippet from my Grunt file.
In addition, I also tried modifying the following in fileprocessor.js
var defaultBlockReplacements = {
css: function (block) {
var media = block.media ? ' media="' + block.media + '"' : '';
return '<link rel="stylesheet" href="' + block.dest + '"' + media + '>';
// I tried returning something else here. It didn't get picked up or even called, it seems.
},
js: function (block) {
var defer = block.defer ? 'defer ' : '';
var async = block.async ? 'async ' : '';
return '<script ' + defer + async + 'src="' + block.dest + '"></script>';
// I tried returning something else here. It didn't get picked up or even called, it seems.
}
};
The text was updated successfully, but these errors were encountered:
Just to add on to this for future visitors, the blockReplacements does not exist in early versions of useMin. I had to upgrade my package; then it worked w/o issue.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am guessing this is user error on my part. But could someone take a look at this? I want to replace the css and js includes with custom text, not the out-of-the-box. Here is a snippet from my Grunt file.
In addition, I also tried modifying the following in fileprocessor.js
var defaultBlockReplacements = {
css: function (block) {
var media = block.media ? ' media="' + block.media + '"' : '';
return '<link rel="stylesheet" href="' + block.dest + '"' + media + '>';
// I tried returning something else here. It didn't get picked up or even called, it seems.
},
js: function (block) {
var defer = block.defer ? 'defer ' : '';
var async = block.async ? 'async ' : '';
return '<script ' + defer + async + 'src="' + block.dest + '"></script>';
// I tried returning something else here. It didn't get picked up or even called, it seems.
}
};
The text was updated successfully, but these errors were encountered: