mirror of
https://github.com/flarum/core.git
synced 2025-08-05 16:07:34 +02:00
Add useExtensions option
This commit is contained in:
@@ -55,6 +55,20 @@ module.exports = function(options = {}) {
|
||||
'jquery': 'jQuery',
|
||||
},
|
||||
|
||||
function() {
|
||||
const externals = {};
|
||||
|
||||
if (options.useExtensions) {
|
||||
for (const extension of options.useExtensions) {
|
||||
externals['@'+extension] =
|
||||
externals['@'+extension+'/forum'] =
|
||||
externals['@'+extension+'/admin'] = "flarum.extensions['"+extension+"']";
|
||||
}
|
||||
}
|
||||
|
||||
return externals;
|
||||
}(),
|
||||
|
||||
// Support importing old-style core modules.
|
||||
function(context, request, callback) {
|
||||
let matches;
|
||||
|
Reference in New Issue
Block a user