http-vue-loader
http-vue-loader copied to clipboard
If working in Visual Studio 2017
Just to mention, that will need to set mimeType for ".vue" extension file to use httpvueloader
May need to do it in Project "ApplicationHost" config file or in IIS Express "ApplicationHost" config file.
Project: C:\Users<your name>\Documents\Visual Studio 2017\Projects<project name>.vs\config
IIS Express: C:\Users<your name>\Documents\IISExpress\config
<mimeMap fileExtension=".vue" mimeType="application/javascript" />
Otherwise, keeps throwing file not found when referencing url file
Yeah, this is a common thing to who use visual studio projects...
Thanks for the tip. But Chrome often handles Vue files as static resources, so how do I configure config to get the latest modified Vue files correctly every time? I'm using asp.net.
All right. I found a way.

@Yxjhasadream you should use cache-busting on querystring parameters instead of using this option from chrome.
@giolvani It really should be, thank you. But I usually need chrome not to cache when I'm debugging, and it's better to cache when it's released.
In MVC Core projects you can use something like this in your Startup.cs Configure:
app.UseStaticFiles(new StaticFileOptions
{
ContentTypeProvider = new FileExtensionContentTypeProvider(
new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) {
{ ".vue", "application/javascript" }
}),
});
I feel that's more maintainable than in the ApplicationHost.
I know this is an old issue, but another way to set this up in an ASP.NET app, is to add the following to the web.config:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".vue" mimeType="application/javascript"/>
</staticContent>
</system.webServer>
For some reason the dev server to use in VueJS in a basic VueJS project (started with npm run serve which runs vue-cli-service serve) .vue files are served as XML.
In this case the loader errors out with "responseText is undefined" - i checked networking activities and the result seems to be fine, so i think, this is also mime-type related. Can someone confirm this?
And, can someone provide a fix for this?
Failed to resolve async component default: ReferenceError: responseText is not defined
running wamp server on windows
looking deeper, the error is this:
SyntaxError: "export declarations may only appear at top level of a module"