You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project uses r.js to convert a set of .js files to a single combined file for distribution. I'd like to produce two files instead - one for all of my code, and one for all third party libraries.
Here is the relevant part of my current r.js config:
Here my_minified_code.js and minified_libs.js are empty files I created for the build process. (If there is a simpler way of achieving this, I'd like to know it.)
The problem with the above setup is that lib3 has dozens of modules, with no "master" module that requires all the others, so I need ot list each of its modules in the "exclude" array. When I update the library, I need to remember to update this list, or parts of the library will end up in the wrong place.
One obvious way to fix this is by filtering by directory - e.g. exclude: [ /^lib3// ]. But the closest I found to that in the docs is fileExclusionRegExp, which seems to do something else entirely.
The text was updated successfully, but these errors were encountered:
gcaini
changed the title
How to split combined minified file into "my code" part and "libraries" part
How to split minified file into "my code" part and "libraries" part
Mar 24, 2015
Build the other way around; first the libs, then exclude the libs from your own code. The optimizer will transitively exclude all the modules that make up the libs.
Hello,
My project uses r.js to convert a set of .js files to a single combined file for distribution. I'd like to produce two files instead - one for all of my code, and one for all third party libraries.
Here is the relevant part of my current r.js config:
Here my_minified_code.js and minified_libs.js are empty files I created for the build process. (If there is a simpler way of achieving this, I'd like to know it.)
The problem with the above setup is that lib3 has dozens of modules, with no "master" module that requires all the others, so I need ot list each of its modules in the "exclude" array. When I update the library, I need to remember to update this list, or parts of the library will end up in the wrong place.
One obvious way to fix this is by filtering by directory - e.g. exclude: [ /^lib3// ]. But the closest I found to that in the docs is fileExclusionRegExp, which seems to do something else entirely.
The text was updated successfully, but these errors were encountered: