Having two different projects, a framework and an app which uses this framework, I would like to use requirejs optimizer to minify both together.
Files:
/framework/
js/
some.js
other.js
framework.js
/app/
js/
main.js
module.js
I want to create an app.min.js with requirejs optimizer which includes the framework files, and the app files, in the right order.
However, I want the framework to be able to minify itself, so define()
and require()
calls in the framework are relative to the framework.js
file.
The problem is that if I try to optimize my app, it won't find the framework files because the relative paths used in the framework (like define(['./some'], ...)
) won't work if I optimize from my app.
How can I do this properly ?