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

Blazorstate.js only included as static files in _content when asp.net core environment is Development #211

Closed
ArneVanBael opened this issue Apr 22, 2020 · 2 comments

Comments

@ArneVanBael
Copy link

ArneVanBael commented Apr 22, 2020

Hey,

I am trying to implement the Blazor-state library in an new project i am working on. I also managed to get the redux dev tools working with the ASPNETCORE_ENVIRONMENT "Development" in my launchSettings.json.

But I also have a environment called "Test" where I want the redux dev tools to be enabled. But the moment I change the ASPNETCORE_ENVIRONMENT to "Test" the blazor-state.js is not published to the _content folder anymore?

This is the situation in environment "Development"
image

And this is the situation in environment "Test"
image

@StevenTCramer
Copy link
Collaborator

My apologies, I just saw this, I have been busy. Will take a look this weekend, I am do for upgrade as official release is soon

@StevenTCramer
Copy link
Collaborator

The issue I think you are having is addressed in the docs. https://docs.microsoft.com/en-us/aspnet/core/razor-pages/ui-class?view=aspnetcore-3.1&tabs=visual-studio#consume-content-from-a-referenced-rcl

In your Server Startup make sure you have

  app.UseStaticFiles();

And in your Program.cs

webBuilder.UseStaticWebAssets();

I have updated the timewarp-template to include this also.

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