mirror of
https://github.com/flarum/core.git
synced 2025-05-11 18:05:29 +02:00
Support, update to webpack 5 (#3135)
This commit is contained in:
parent
89dfad5f38
commit
cb6405110c
6799
js/package-lock.json
generated
6799
js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
||||
"clsx": "^1.1.1",
|
||||
"color-thief-browser": "^2.0.2",
|
||||
"dayjs": "^1.10.7",
|
||||
"expose-loader": "^1.0.3",
|
||||
"expose-loader": "^2.0.0",
|
||||
"jquery": "^3.6.0",
|
||||
"jquery.hotkeys": "^0.1.0",
|
||||
"mithril": "^2.0.4",
|
||||
@ -28,10 +28,10 @@
|
||||
"bundlewatch": "^0.3.2",
|
||||
"cross-env": "^7.0.3",
|
||||
"flarum-tsconfig": "^1.0.2",
|
||||
"flarum-webpack-config": "1.0.0",
|
||||
"flarum-webpack-config": "2.0.0",
|
||||
"prettier": "^2.4.1",
|
||||
"typescript": "^4.4.4",
|
||||
"webpack": "^4.46.0",
|
||||
"webpack": "^5.60.0",
|
||||
"webpack-cli": "^4.9.1",
|
||||
"webpack-merge": "^4.2.2"
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Expose jQuery, mithril and dayjs to the window browser object
|
||||
import 'expose-loader?exposes[]=$&exposes[]=jQuery!jquery';
|
||||
import 'expose-loader?exposes=$,jQuery!jquery';
|
||||
import 'expose-loader?exposes=m!mithril';
|
||||
import 'expose-loader?exposes=dayjs!dayjs';
|
||||
|
||||
|
@ -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;";
|
||||
});
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user