Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide hooks to allow for integration with other JavaScript frameworks #5182

Closed
elanderson opened this issue May 25, 2018 · 13 comments
Closed
Labels
affected-few This issue impacts only small number of customers area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-spa ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. severity-major This label is used by an internal tool Status: Resolved

Comments

@elanderson
Copy link

I am looking into creating a Vue template that works with the Vue CLI. Similar to what was done with the provided Angular and React templates.

Following the path of UseReactDevelopmentSever I was able to get an example up and running, but to do so I ended up copying and pasting about 6 class from this repo that are marked as internal. All of the added classes came in when I got to the point to converting StartCreateReactAppServerAsync.

Would it be possible to add new hooks to making interation with other framework easier or make the existing classes public?

For reference the classes I had to import were:

  • EventedStreamStringReader
  • LoggerFinder
  • NpmScriptRunner
  • TaskTimeoutExtensions
  • TcpPortFinder

While none of these classes are huge it would be nice to not have to manually keep them in sync with changes in this repo.

@SteveSandersonMS
Copy link
Member

SteveSandersonMS commented May 29, 2018

This makes sense - thanks for the suggestion.

Currently it's not something on our backlog, but CC @glennc for planning purposes in case this changes. Edit: also @danroth27, another PM.

@elanderson
Copy link
Author

@SteveSandersonMS would this be something I could submit a PR for? I would be happy to play around with it a bit if the team would have time to review it.

@SteveSandersonMS
Copy link
Member

It's not really something we're looking for a PR for, because the cost isn't implementing the change (we can implement it trivially).

The cost is going through an API review process and committing to support those APIs for the long term. So it's a strategy decision to be made.

@elanderson
Copy link
Author

Understood. Thanks for the consideration!

@EEParker
Copy link
Contributor

EEParker commented May 29, 2018

@elanderson I went through the same process for Vue + vue-cli and my solution ended up being nearly identical to the react development server. The only change I made was to the regex to detect if the server was running here: https://github.com/aspnet/JavaScriptServices/blob/dev/src/Microsoft.AspNetCore.SpaServices.Extensions/ReactDevelopmentServer/ReactDevelopmentServerMiddleware.cs#L87

@SteveSandersonMS Perhaps this regex could be changed to something that more frameworks support? I noticed in some previous versions it was new Regex("Local:\\s*(http\\S+)", RegexOptions.None, RegexMatchTimeout), which does work for Vue. Ref: aspnet/JavaScriptServices@68c4620#diff-6b9344cdb73193920e8ee7888a4095c6L74

@elanderson
Copy link
Author

@EEParker that was my experience as well. There would also be some strings for logging and exceptions that would need to change, but the core is the regex you mentioned.

@valeriob
Copy link

valeriob commented Jul 9, 2018

i've come up with the same solution as @EEParker, my working pull request is here aspnet/JavaScriptServices#1713

@buldo
Copy link

buldo commented Aug 4, 2018

I also have solution for this issue in this PR #1736

@ascott18
Copy link
Contributor

ascott18 commented Aug 24, 2018

Now that Visual Studio 15.8 is RTM with support for .vue SFCs, any chance we could get some traction here for supporting vue-cli based projects officially? @vue/cli is also RTM now, too.

@aspnet-hello aspnet-hello transferred this issue from aspnet/JavaScriptServices Dec 17, 2018
@aspnet-hello aspnet-hello added area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-spa labels Dec 17, 2018
@mkArtakMSFT
Copy link
Member

Thanks for contacting us, @elanderson.
This is not something we plan to do in the near future.

@mkArtakMSFT
Copy link
Member

Reopening this as we plan to enable better integration with SPA frameworks in 5.0. You can see more details about this plan here.

@mkArtakMSFT
Copy link
Member

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@javiercn
Copy link
Member

@elanderson thanks for contacting us.

We've significantly changed the way the SPA templates are setup for development and production to align with how other backend frameworks approach this and as a result we no longer use SpaServices as part of the development workflow.

While we haven't removed or obsoleted the code, we don't plan to make future changes/fixes on it and we recommend people migrate to the new approach we use in the templates.

This approach is agnostic to the front-end SPA framework being used and should allow integration with any SPA framework available.

@javiercn javiercn added the ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. label Oct 28, 2021
@ghost ghost added the Status: Resolved label Oct 28, 2021
@javiercn javiercn removed this from the Backlog milestone Oct 28, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affected-few This issue impacts only small number of customers area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates enhancement This issue represents an ask for new feature or an enhancement to an existing one feature-spa ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. severity-major This label is used by an internal tool Status: Resolved
Projects
None yet
Development

No branches or pull requests