Skip to content

Commit 1e4d8e1

Browse files
lb-LB Johnston
andauthored
Remove jQuery loading by default (#252)
- Sill used as a peer dependency of Bootstrap - Core jQuery dependency removed though - Fixes #250 Co-authored-by: LB Johnston <[email protected]>
1 parent fe9aa92 commit 1e4d8e1

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"@wagtail/eslint-config-wagtail": "^0.4.0",
2222
"autocompleter": "^6.0.3",
2323
"bootstrap": "^4.4.1",
24-
"eslint": "^8.16.0",
25-
"jquery": "^3.5.1"
24+
"eslint": "^8.16.0"
2625
},
2726
"scripts": {
2827
"start": "npm run watch",

sphinx_wagtail_theme/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
<script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>
185185
<script type="text/javascript" src="{{ pathto('_static/language_data.js', 1) }}"></script>
186186
<script type="text/javascript">
187-
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
187+
document.addEventListener('DOMContentLoaded', function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
188188
</script>
189189
<script type="text/javascript" id="searchindexloader"></script>
190190
{% endblock -%}

webpack.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ module.exports = {
1313
publicPath: "",
1414
filename: "[name].js",
1515
},
16-
externals: {
17-
jquery: "window.$",
18-
},
1916
module: {
2017
rules: [
2118
{

0 commit comments

Comments
 (0)