1
0
mirror of https://github.com/flarum/core.git synced 2025-08-09 01:46:35 +02:00

Support, update to webpack 5 (#3135)

This commit is contained in:
Alexander Skvortsov
2021-10-31 14:21:17 -04:00
committed by GitHub
parent 89dfad5f38
commit cb6405110c
4 changed files with 770 additions and 6041 deletions

View File

@@ -179,11 +179,11 @@ class Frontend implements ExtenderInterface
if ($this->js) {
$assets->js(function (SourceCollector $sources) use ($moduleName) {
$sources->addString(function () {
return 'var module={}';
return 'var module={};';
});
$sources->addFile($this->js);
$sources->addString(function () use ($moduleName) {
return "flarum.extensions['$moduleName']=module.exports";
return "flarum.extensions['$moduleName']=module.exports;";
});
});
}