.NET 8 provides a couple of great project templates to get you up and running quickly. However, the MPA (multiple-page application) is not getting ...
For further actions, you may consider blocking this person and/or reporting abuse
In case your application cannot find/load the
site.entry.js
File please checkprogram.cs
if the following line of code is included:app.UseStaticFiles();
Took me a couple of hours to find this.
Im trying to import vue in entry.js. Then, when I try to use vue in other page, it shows Vue is not defined. But when I use cdn link and put it in layout.cshtml, it worked.
Which bundles and pages do you have? If Vue is only imported for a single bundle then it won't be available on other pages that don't use this bundle.
Sorry. I'm new to node js. But here is what I did:
As for lodash, it worked fine. But for Vue, when I create a vue app in the other page it said Vue is not defined. But if I create a vue app in layout page and write the js code in site.js it worked.
So you have site.entry.js, which is loaded from two different pages, but only on one page it throws an error?
Yes. I loaded site.entry.js in _Layout.cshtml. I create new page which render in _Layout.cshtml . This new page throws an error.
Great article - thanks so much!
This is great content about asp.net with webpack. Thanks for taking the time to contribute to the growth of many devs
Thank you very much - this was very helpful! :)
Thank you!
Dank u :)
Kudos, nice write up 🙌🏼