<cite>ismcagdas: </cite> I have created an issue here <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero/issues/605">https://github.com/aspnetzero/aspnet-zero/issues/605</a>. We will try to fix it soon.
Thanks!
Hello,
I am currently using the ASP.NET MVC 5.x & jQuery based on .NET Framework, V5.2.0 version of the application. I noticed the datatables are no longer responsive. For example:
<a class="postlink" href="https://imgur.com/a/jPKwM">https://imgur.com/a/jPKwM</a>
While in the v5.0.0 version this happens:
<a class="postlink" href="https://imgur.com/a/etyzt">https://imgur.com/a/etyzt</a>
Is this intended behavior or am I doing something wrong? Thanks!
Ahh got it fixed! So what happens is that the last .js is trimmed of the output file names, and then .min.js is added. So that leaves you with .min.min.js.
Changing var minifiedJsOutputFile = outputFileName.substr(0, outputFileName.lastIndexOf(".")) + ".min.js"; to var minifiedJsOutputFile = outputFileName.substr(0, outputFileName.lastIndexOf(".")) + ".js";
And the same for css files, fixed the problem!
Thanks guys!
<cite>alirizaadiyahsi: </cite> Hi @michelmk2, we resolved this issue.
Check related change: <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/commit/3c552b4648377d8216256af0b01b37564b44e2dd#diff-16281b32d0eef5f5b47ce3b2c590de12">https://github.com/aspnetzero/aspnet-ze ... b2c590de12</a>
Hi, Thanks for the link! What I see now, is that gulp generates *.min.min.js and *.min.min.css files. The min min files are no longered generated if I re-add the || outputFileName.endsWith('.min.js') line at the bundle.createMinified step. But then i'm back to my initial problem of the files not being minified :(.
Greetings
You mean, like this right?
gulp.task("min:js", function () {
var tasks = getBundles(regex.js).map(function (bundle) {
var outputFileName = getOutputFileName(bundle.outputFileName);
var outputFolder = getOutputFolder(bundle.outputFileName);
return gulp.src(bundle.inputFiles)
.pipe(concat(outputFileName))
.pipe(gulp.dest(outputFolder));
});
if (gutil.env.prod) {
var minifyTasks = getBundles(regex.js).map(function (bundle) {
var outputFileName = getOutputFileName(bundle.outputFileName);
var outputFolder = getOutputFolder(bundle.outputFileName);
if (bundle.createMinified === false || outputFileName.endsWith('.min.js')) {
return null;
}
var minifiedJsOutputFile = outputFileName.substr(0, outputFileName.lastIndexOf(".")) + ".min.js";
return gulp.src(bundle.inputFiles)
.pipe(concat(minifiedJsOutputFile))
.pipe(uglify())
.pipe(gulp.dest(outputFolder));
});
for (var i = 0; i < minifyTasks.length; i++) {
if (minifyTasks[i] == null) {
continue;
}
tasks.push(minifyTasks[i]);
}
}
return merge(tasks);
}).on('error', function (error) {
gutil.log(error.message);
});
Unfortunately this doesn't give me any errors :(.
@ismcagdas. Nope! Same results. What's really strange is that it isn't working for the default items either.. E.g. ~wwwroot\view-resources\Views\Account\EmailActivation.min.js. Those min files are also just the regular files.
Greetings,
That depends, what kind of reports are you talking about? We often use SSRS for all kinds of reports (Invoices, documents, some simple graphs, etc.)!
Hi Guys,
I'm using the new version 5 template (.net core with jquery).
When i'm running the gulp --env prod command in my *.Web.Mvc folder, .min.js files are being generated in my /wwwroot/view-resources/areas/{name}/views/{name} folders. The min files are the same as the regular files though, the content is unminified Javascript.
I've specified the files to be minified in the bundle.config.js, like below:
{
outputFileName: "wwwroot/view-resources/Areas/App/Views/test/_CreateOrEditModal.min.js",
inputFiles: [
"wwwroot/view-resources/Areas/App/Views/test/_CreateOrEditModal.js"
]
}
What am I doing wrong here?
Thanks!
<cite>JimS: </cite> I have the same issue. You might notice that the min files in *.Web.Mvc\wwwroot\view-resources\Areas\App\Views_Bundles are not updated.
I went to the command line and navigated to the root folder of the *.Web.Mvc project where the gulpfile.js is located, and I ran gulp --prod to minify the production files.
Publish the project and the updated min files should be included. It is clumsy, but it works.
You're a hero man! Works like a charm.
Hi!
I'm using the ASP.NET MVC & Jquery template (version V5.0.4). The project works great locally, how ever if I publish it I'm getting font 404 errors.
If the image link doesn't work, use: <a class="postlink" href="https://imgur.com/fxeyjkO">https://imgur.com/fxeyjkO</a>
I've added the following to the web config, but that doesn't seem to work:
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>
If I check the network tab, i'm seeing that the fonts are giving me 404 errors.
Thanks in advance!