-
Notifications
You must be signed in to change notification settings - Fork 46
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
How To : Organizing javascript in a asp.net core modularized application (modules in dlls) #106
Comments
I think the section titled "OVERRIDING ENTRYPOINT RESOLUTION" here: http://requirejsnet.veritech.io/setup.html may be of help. Essentially you can implement your own logic for locating an Entrypoint script |
I forgot to mention that I am on .Net 5 and this is not yet ported to support it officially right? However I found : https://github.com/davidsk/RequireJSDotNet/blob/RequireJsDotNet_Core1.0/MVC6/Startup.cs which seems to use the resolver you mention above. Is this what you were talking about? Do you have a plan to officially support .Net 5? |
My Application is organized in a way that some features are working as a plugin. Each plugin has it's own APIs, Views, Static files etc.. I am using ViewLocationExpander to find the view files owned by plugins which is not in the standard location but in the plugins relative path. Example;
As you see in above structure if you delete the a plugin from the Modules folder entire plugin related features will get deactivated. So code for that plugin is 100% within the plugin directory.
Now I am planning to use RequireJS and try to modularize javascripts that is needed by each plugin. However the doucment says:
But in my case RequireJS should be able to load the JS file not from the primary ~/Scripts folder but the /wwwroot/js folder which is inside the Plugin folder (\Modules\Plugin1\wwwroot\js). If I can get this done (May be like ViewLocationExpander), I can have a 100% modularized app.
Is this possible?
The text was updated successfully, but these errors were encountered: