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

Improve development turnaround by loading index.min.js from the disk #173

Closed
richorama opened this issue Aug 24, 2018 · 2 comments
Closed

Comments

@richorama
Copy link
Member

As suggested by @seniorquico

Developing the dashboard can be slow, as you have to restart the C# test host after every change to the JS.

If a index.min.js file exists on the disk, we could pick this up in preference to the embedded file, and save the test host restart.

This time could be further improved if a technology such as webpack was used to build the minified javascript incrementally.

@seniorquico
Copy link
Contributor

It looks like DashboardMiddleware already tries to load "index.min.js" from disk. I'm now guessing this isn't working due to an issue with my test process's current directory or something. I'll try to step through the middleware to see if I can identify the cause in my test environment.

Thinking about a webpack-based build, ASP.NET's SPA services include a proxy middleware that could be paired with webpack's dev server. Based on some quick searches, it sounds like the proxy middleware even propagates webpack's live-reload/HRM signals. This could be added to the self-host config like:

if (env.IsDevelopment())
{
    app.UseSpa(spa =>
    {
        spa.UseProxyToSpaDevelopmentServer("http://localhost:3000");
    });
}

I'll admit, I don't have any experience with ASP.NET's SPA services packages. Feedback welcome.

@richorama
Copy link
Member Author

closed by #178 & #175

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants