My personal feeling is Python Version of webpack
pip install webassets
from webassets import Environment, Bundle
assets_env = Environment(
directory='./static',
url='/static')
common_js = Bundle(
'js/common-1.js',
'js/common-2.js',
filters='jsmin',
output='js/common.js')
assets_env.register('common_js', common_js)
print(assets_env['common_js'].urls())
# ['/static/js/common.js?207d589d']
assets_env.debug = True
print(assets_env['common_js'].urls())
# ['/static/js/common-1.js', '/static/js/common-2.js']
Input file
static/js/common-1.js
function foo1() {
}
static/js/common-2.js
function foo2() {
}
The output file
static/js/common.js
function foo1(){}
function foo2(){}