This repository was archived by the owner on Nov 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change 11This is a stand-alone module to add VueCli support to Aspnet Core 2.1.
22
33Due to the discussion here, it was decided to not be included in the Microsoft owned package.
4- https://github.com/aspnet/JavaScriptServices/pull/1726
4+ https://github.com/aspnet/JavaScriptServices/pull/1726
5+
6+ Usage Example:
7+ ``` csharp
8+ public class Startup
9+ {
10+ public Startup (IConfiguration configuration )
11+ {
12+ Configuration = configuration ;
13+ }
14+
15+ public IConfiguration Configuration { get ; }
16+
17+ public virtual void ConfigureServices (IServiceCollection services )
18+ {
19+ services .AddMvc (); // etc
20+ }
21+
22+ public virtual void Configure (IApplicationBuilder app , IHostingEnvironment env )
23+ {
24+ // your config opts...
25+
26+ // add static files from SPA (/dist)
27+ app .UseSpaStaticFiles ();
28+
29+ app .UseMvc (routes => /* configure*/ );
30+
31+ app .UseSpa (spa =>
32+ {
33+ spa .Options .SourcePath = " ClientApp" ;
34+ #if DEBUG
35+ if (env .IsDevelopment ())
36+ {
37+ spa .UseVueCli (npmScript : " serve" , port : 8080 ); // optional port
38+ }
39+ #endif
40+ });
41+ }
42+ }
43+ ```
Original file line number Diff line number Diff line change 33 <PropertyGroup >
44 <Description >Helpers for building single-page applications on ASP.NET MVC Core using Vue Cli.</Description >
55 <TargetFramework >netstandard2.0</TargetFramework >
6+ <Title >VueCliMiddleware</Title >
67 <VersionPrefix >2.1.1</VersionPrefix >
78 <LangVersion >Latest</LangVersion >
89 <Authors >EEParker</Authors >
You can’t perform that action at this time.
0 commit comments