lmd
lmd copied to clipboard
config.root and external lmd configs
External lmd configs ignore config.root
.
var config = {
path: '../../../../',
modules: {
main: 'app/all7/catalog_view/main.js'
},
bundles: {
searchFilter: '../../../../components/search_filter/.lmd/dev.lmd.js' // have to add ../../../../
},
main: 'main',
output: 'build/build.js',
};
- https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L635
- https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L368
- https://github.com/azproduction/lmd/blob/master/lib/lmd_common.js#L1235
I assume "config_root": "../../../../"
is a good solution for this issue. And as LMD interpolates configs we could keep config DRY:
var config = {
root: '../../../../',
config_root: '${root}'
};
// It interpolates to
var config = {
root: '../../../../',
config_root: '../../../../'
};