.net - The HTML references my CSS differently based upon deployment machine -
my mvc 4 site adds css files using bundle.config class
bundles.add(new stylebundle("~/content/styles").include( "~/content/css/website.css", "~/content/css/banner.css"));
on localhost, when view source code, html files render as
<link href="/content/css/website.css" rel="stylesheet"/> <link href="/content/css/banner.css" rel="stylesheet"/>
i have deployed site live, source code renders 1 line
<link href="/content/styles?v=fxcdhaogpdvcroxkmfewgqggo9ucfzckn3pan8boizi1" rel="stylesheet"/>
oddly, of css still displays (but images not).
i assume issue isn't web.config file since both local , live share same file.
my question is, how remove behavior , have live server render html in same way local host?
bundling minifies css 1 file, make images work need set bundle ~/content/styles
relative actual css set ~/content/css/styles
have @ this post if don't want bundling occur on deployed site
Comments
Post a Comment