asp.net mvc - Bundling and Minification not rendering correct path -
i'm having issue bundling , minification feature of asp.net mvc 4 have following bundle setup:
bundles.add(new stylebundle("~/backendcss").include( "~/backendcontent/bootstrap/css/bootstrap.min.css", "~/backendcontent/assets/jui/css/jquery-ui.css", "~/backendcontent/assets/jui/jquery-ui.custom.css", "~/backendcontent/plugins/uniform/css/uniform.default.css", "~/backendcontent/plugins/fullcalendar/fullcalendar.css", "~/backendcontent/plugins/fullcalendar/fullcalendar.print.css", "~/backendcontent/assets/css/fonts/icomoon/style.css", "~/backendcontent/assets/css/main-style.css", "~/backendcontent/plugins/pnotify/jquery.pnotify.css", "~/backendcontent/plugins/msgbox/jquery.msgbox.css", "~/backendcontent/introjs/css/introjs.css"));
when placed on page come out so:
<link href="/backendcontent/assets/jui/css/jquery-ui.css" rel="stylesheet"/> <link href="/backendcontent/assets/jui/jquery-ui.custom.css" rel="stylesheet"/> <link href="/backendcontent/plugins/uniform/css/uniform.default.css" rel="stylesheet"/> <link href="/backendcontent/plugins/fullcalendar/fullcalendar.css" rel="stylesheet"/> <link href="/backendcontent/plugins/fullcalendar/fullcalendar.print.css" rel="stylesheet"/> <link href="/backendcontent/assets/css/fonts/icomoon/style.css" rel="stylesheet"/> <link href="/backendcontent/assets/css/main-style.css" rel="stylesheet"/> <link href="/backendcontent/plugins/pnotify/jquery.pnotify.css" rel="stylesheet"/> <link href="/backendcontent/plugins/msgbox/jquery.msgbox.css" rel="stylesheet"/> <link href="/backendcontent/introjs/css/introjs.css" rel="stylesheet"/>
first problem tilda
~
not coming in beginning of link , think that's 1 of problems (site not rendering properly) of above css stylesheets resolving there lot of imports , relative urls (images) , think getting messed (without bundles, if point~/backendcontent/....
working finesecond problem when set
bundletable.enableoptimizations = true;
there lot more problems , digging deeper huge list of (4368,1): run-time error css1019: unexpected token, found '@import' (4368,9): run-time error css1019: unexpected token, found 'url("layout.css")'
i don't know if important minified , rendered style link produced @styles.render("~/backendcss")
is:
<link href="/backendcss?v=emx6ycvb78xpwzv9dw6sehqst742j8_m1irfuc0idaq1" rel="stylesheet"/>
any ideas? i'm sorry first time i'm using feature , site having many css , js save lot of bandwidth , speed whole site. plus plain cool (that if can work)!!!
the
~
not supposed rendered. that's special character in asp.net meansthe root of application
i'm not sure why having issues actual minification, that'd pretty hard diagnose without source.
the link when optimized should that. ?v=xxx @ end cache busting people updated css when change css files.
Comments
Post a Comment