[
https://issues.apache.org/jira/browse/OFBIZ-9976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480017#comment-17480017
]
Aditya Sharma edited comment on OFBIZ-9976 at 1/21/22, 11:49 AM:
-----------------------------------------------------------------
Hello Jacques,
Thanks for sharing those links!
I was thinking Gulp or Grunt for minifying initially, further with webpack we
could use it as module bundler[1][2][3][4] something similar to what we want to
achieve with require js except here it will be taken care while bundling the
code with advance tree shaking[5].
Also, we do not need a separate gradle plugin the current plugin supports it
[6] [7]
1. [https://webpack.js.org/concepts/]
2. [https://irian.to/blogs/bundle-your-javascript-code-from-scratch/]
3. [https://lihautan.com/what-is-module-bundler-and-how-does-it-work/]
4. [https://medium.com/@gimenete/how-javascript-bundlers-work-1fc0d0caf2da]
5. [https://webpack.js.org/guides/tree-shaking/]
6.
[https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/usage.md#executing-npm-tasks]
7.
[https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#how-do-i-run-commands-provided-by-npm-packages]
was (Author: aditya.sharma):
Hello Jacques,
Thanks for sharing those links!
I was thinking Gulp and Grunt for minifying initially, further with webpack we
could use it as module bundler[1][2][3][4] something similar to what we want to
achieve with require js except here it will be taken care while bundling the
code with advance tree shaking[5].
Also, we do not need a separate gradle plugin the current plugin supports it
[6] [7]
1. [https://webpack.js.org/concepts/]
2. [https://irian.to/blogs/bundle-your-javascript-code-from-scratch/]
3. [https://lihautan.com/what-is-module-bundler-and-how-does-it-work/]
4. [https://medium.com/@gimenete/how-javascript-bundlers-work-1fc0d0caf2da]
5. [https://webpack.js.org/guides/tree-shaking/]
6.
[https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/usage.md#executing-npm-tasks]
7.
[https://github.com/node-gradle/gradle-node-plugin/blob/master/docs/faq.md#how-do-i-run-commands-provided-by-npm-packages]
> Introduce require.js to organise JavaScript files
> -------------------------------------------------
>
> Key: OFBIZ-9976
> URL: https://issues.apache.org/jira/browse/OFBIZ-9976
> Project: OFBiz
> Issue Type: Improvement
> Components: ALL APPLICATIONS
> Affects Versions: Trunk, Upcoming Branch
> Reporter: Aditya Sharma
> Assignee: Jacques Le Roux
> Priority: Major
>
> As suggested by [~jacques.le.roux] in
> http://markmail.org/message/eec2anlwdt4azaac and
> http://ofbiz.markmail.org/thread/ti54omjdt4fy662m and as per the discussion
> with [~amardeepsj] in OFBIZ-7758, introduce require.js http://requirejs.org/
> to load javascript files.
> Require.js offers a lot of benefits some of them includes:
> * Asynchronous module loading.
> * Well-structured code
> * Creating and re-using modules without polluting the global namespace
> * Explicit defining of dependencies between module
--
This message was sent by Atlassian Jira
(v8.20.1#820001)