This repository has been archived by the owner on Apr 20, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 339
.NET MVC Project cshtml files not being updated #625
Comments
Giovanni-Mattucci
changed the title
.NET MVC Project cshtml files not getting updated
.NET MVC Project cshtml files not being updated
Aug 11, 2016
|
Hi, I've had the same problems here but now I've found a working version. The trick is to remove the starting Does not work: <link rel="stylesheet" href="~/styles/bootstrap.css"> Works: <link rel="stylesheet" href="/styles/bootstrap.css"> My Gruntfile is: // Usemin bundler
"useminPrepare": {
options: {
dest: "<%= config.release.wwwroot %>",
root: "<%= config.debug.wwwroot %>"
},
html: "<%= config.debug.root %>/Views/Shared/_Layout.cshtml",
css: "<%= config.debug.styles %>/*.css"
},
// Performs rewrites based on rev and the useminPrepare configuration
"usemin": {
options: {
assetsDirs: ["<%= config.release.wwwroot %>"]
},
html: ["<%= config.release.root %>/Views/*/*.cshtml"],
css: ["<%= config.release.styles %>/*.css"]
},
// Add version tag to filenames
"filerev": {
dist: {
src: [
"<%= config.release.styles %>/*.css",
"<%= config.release.scripts %>/*.js",
"<%= config.release.images %>/**/*"
]
}
}, The problem is that this will brake all the Area views because the links wont work anymore... |
Gruntfile use to relative path; |
+1 |
1 similar comment
+1 |
+99 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm having trouble with usemin not updating URLs within my
.cshtml
files.Here is my current setup in my
gruntfile.js
:Does usemin only work with .html files? Or will it scan any file and replace those URL strings?
As an FYI I utilized this yeoman generator to create this file initially.
The text was updated successfully, but these errors were encountered: