]> source.dussan.org Git - nextcloud-server.git/commit
feat(template): Allow `JSResourceLocator` to find ES6 scripts
authorFerdinand Thiessen <rpm@fthiessen.de>
Tue, 10 Jan 2023 00:11:34 +0000 (01:11 +0100)
committerFerdinand Thiessen <rpm@fthiessen.de>
Wed, 22 Feb 2023 20:19:37 +0000 (21:19 +0100)
commit00e041b90704b20a37e2e13b8842d46d616d685d
tree51e596ea4bd4b3be42f21cef0f4d026895d20b2a
parentdbb1fa12738e4d30ed22deffa0b2dd921f96af04
feat(template): Allow `JSResourceLocator` to find ES6 scripts

Enable module js (ES6) support on the `JSResourceLocator`.
This changes `JSResourceLocator` to look for `.mjs` files first
to allow applications to provide a fallback `.js` for older Nextcloud versions.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
lib/private/Template/JSResourceLocator.php
tests/lib/Template/JSResourceLocatorTest.php