]> source.dussan.org Git - nextcloud-server.git/commitdiff
Enforce providing jquery from server node_modules 33517/head
authorJulius Härtl <jus@bitgrid.net>
Fri, 12 Aug 2022 18:52:26 +0000 (20:52 +0200)
committerJulius Härtl <jus@bitgrid.net>
Fri, 12 Aug 2022 18:52:26 +0000 (20:52 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
webpack.common.js

index 4d98eb579c7d27161b6c1c535ebc43a65cf765f3..28c569ef7acd6efb9aaa309b00fba281b9b2b6ea 100644 (file)
@@ -141,7 +141,9 @@ module.exports = {
                new VueLoaderPlugin(),
                new webpack.ProvidePlugin({
                        // Provide jQuery to jquery plugins as some are loaded before $ is exposed globally.
-                       jQuery: 'jquery',
+                       // We need to provide the path to node_moduels as otherwise npm link will fail due
+                       // to tribute.js checking for jQuery in @nextcloud/vue
+                       jQuery: path.resolve(path.join(__dirname, 'node_modules/jquery')),
                        // Shim ICAL to prevent using the global object (window.ICAL).
                        // The library ical.js heavily depends on instanceof checks which will
                        // break if two separate versions of the library are used (e.g. bundled one