Closed mttmccb closed 6 years ago
I think you are seeing the loading screen as you have not set the environment variable ASPNETCORE_ENVIRONMENT=Development
It should load, the missing vendor.css should just be a warning in the console and you can probably remove it from the _ViewLayout as the CSS is injected into the page automatically.
I'll have a look (not in the office few a days) but I would still expect it to work regardless of the environment, I haven't looked into the config but I'm guessing it will minify/hash the files?
If it turns out not to be the problem try to downgrade nodejs. 9.1 is pretty new
@mttmccb the variable is required as the webpack dev middleware is only enabled in development environments within the startup project file. See here for more info: https://blogs.msdn.microsoft.com/webdev/2017/02/14/building-single-page-applications-on-asp-net-core-with-javascriptservices/
If you do dotnet publish it will produce production minified files. When you have generated the files with either dotnet publish
(or au build
) you could run without the environment variable set but you wouldn't have HMR
Thanks, I can confirm for development the following worked
export ASPNETCORE_ENVIRONMENT=Development
dotnet run
and for production
export ASPNETCORE_ENVIRONMENT=Production
dotnet publish
dotnet run
It did throw a few errors for production but still worked ok.
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Publish.targets(109,5): error MSB3030: Could not copy the file "/Users/matt/test/POC.AureliaWebpackCLI/wwwroot/dist/app.bundle.js" because it was not found. [/Users/matt/test/POC.AureliaWebpackCLI/project.csproj]
/usr/local/share/dotnet/sdk/2.0.0/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Publish.targets(109,5): error MSB3030: Could not copy the file "/Users/matt/test/POC.AureliaWebpackCLI/wwwroot/dist/vendor.bundle.js" because it was not found. [/Users/matt/test/POC.AureliaWebpackCLI/project.csproj]
Where would the best place to document this? As part of the wizard or maybe just in the CLI docs?
Thanks for the update @mttmccb
We can link to the microsoft docs in the wizard and in the cli docs
added this to https://github.com/aurelia/cli/pull/747
I'm submitting a bug report
Library Version: 0.32.0
Operating System: OSX 10.31.1
Node Version: 9.1.0
NPM Version: 5.5.1
Browser: all
Language: TypeScript 2.6.1
Loader/bundler: Webpack
Current behavior: Following installation the app fails to load (see the loading screen and that's it) after
dotnet run
with a 404 on http://localhost:5000/dist/vendor.cssThe following options were chosen
What is the expected behavior? App runs successfully
What is the motivation / use case for changing the behavior? I want it to work out of the box