-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
aurelia-cli 1.0.0 - .NET Core project with Aurelia built-in bundler does not start #1108
Comments
So there is only instruction on how to hook up webpack. That's probably why old cli didn't have cli-bundler option for dotnet-core app. I am not a dotnet user, I cannot even got a sample dotnet 2.2 app with aurelia+webpack working, @brandonseydel @artmasa @arjendeblok do you guys knows how to hook up cli-bundler front-end in the |
https://github.com/aurelia/dotnet/blob/master/README.md You can download the night package and follow the readme to patch an existing cli project. You can also download the templates and start from there. |
@3cp I think combination of cli-bundler and dotnet-core project is valid to have, even without tight development integration and hot-module-replacement in place. I am actually using it like this for years. Bigger problem is that so many project template combinations in @brandonseydel I'll take a look at those templates. Thx. |
@nenadvicentic if you know how to hook them up, please send a PR :-) |
@3cp I did not manage to connect app.UseStaticFiles();
app.UseSpaStaticFiles();
app.UseSpa(spa => {
spa.Options.SourcePath = "%replaceWithAureliaCLIRoot%";
if (env.IsDevelopment())
{
spa.UseAureliaCliServer(); // Optional HMR (Hot Module Reload)
}
}); |
Oh, I didn't know @brandonseydel's solution works for cli-bundler too. We probably should use the middleware in default cli template offering, if someone can create a PR. |
I'm submitting a bug report
1.0.0
Please tell us about your environment:
Operating System:
Windows 10
Browser:
all
Language:
TypeScript 3.4.5
Loader/bundler:
RequireJS/Aurelia build-in bundler
Current behavior:
When selecting .NET Core project with Aurelia built-in bundler, configuration does not work, because .NET
Startup.cs
class contains code for Webpack Dev Middleware, which should not be used with Aurelia built-in bundler.Bellow are full project options selected:
Global aurelia-cli v1.0.0
_ _ ____ _ ___
__ _ _ _ _ __ | () __ _ / | | | |
/
| | | | '__/ _ \ | |/ _
| | | | | | || (| | || | | | __/ | | (| | | || |___ | |
_,|_,|| ___|||_,| _|||
√ Please enter a name for your new project: · WebApplication-Aureli-Cli
√ Would you like to use the default setup or customize your choices? · Custom App
√ Which bundler would you like to use? · CLI's built-in bundler with an AMD module loader
√ Which AMD module loader would you like to use? · RequireJS
√ What platform are you targeting? · .NET Core
√ What transpiler would you like to use? · TypeScript
√ How would you like to setup your HTML template? · Minimum Minification
√ What css preprocessor would you like to use? · Sass
√ Do you want to add PostCSS processing · Typical
√ Which unit test runner would you like to use? · Jest
√ Would you like to configure integration testing? · Protractor
√ What is your default code editor? · Visual Studio Code
√ Which features do you want scaffolded into your project? · Navigation App
Error is:
---> (Inner Exception #0) Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: Webpack dev middleware failed because of an error while loading 'aspnet-webpack'. Error was: Error: Cannot find module 'aspnet-webpack'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:\Users\Nenad\AppData\Local\Temp\pd2rae2s.bpj:83:19)
at webpack_require (C:\Users\Nenad\AppData\Local\Temp\pd2rae2s.bpj:20:30)
at createWebpackDevServer (C:\Users\Nenad\AppData\Local\Temp\pd2rae2s.bpj:62:26)
at C:\Users\Nenad\AppData\Local\Temp\1vtizutj.5vx:114:19
at IncomingMessage. (C:\Users\Nenad\AppData\Local\Temp\1vtizutj.5vx:133:38)
at IncomingMessage.emit (events.js:194:15)
Current directory is: c:\Users\Nenad\source\repos\WebApplication-Aureli-Cli
This is bug. Project with selected options should work from the get go.
The text was updated successfully, but these errors were encountered: