Merge pull request #18943 from overleaf/ae-jquery-revert

Revert "Upgrade jQuery to v3 (#18796)"

GitOrigin-RevId: fa7815b7bfe28239c86900b62bdcd3c4dac3a65f
This commit is contained in:
Alf Eaton
2024-06-18 08:04:29 +00:00
committed by Copybot
parent 6ba61f19f4
commit 5a5defee69
3 changed files with 54 additions and 34 deletions
+12 -6
View File
@@ -255,6 +255,18 @@ module.exports = {
},
],
},
{
// Expose jQuery and $ global variables
test: require.resolve('jquery'),
use: [
{
loader: 'expose-loader',
options: {
exposes: ['$', 'jQuery'],
},
},
],
},
],
},
resolve: {
@@ -297,12 +309,6 @@ module.exports = {
contextRegExp: /moment$/,
}),
// Set window.$ and window.jQuery
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
}),
// Copy the required files for loading MathJax from MathJax NPM package
new CopyPlugin({
patterns: [