Skip to content

Commit 3cfa7a1

Browse files
committed
Auto merge of #2224 - Turbo87:jquery, r=locks
Remove jQuery Following #2209 there does not seem to be any code left that relies on jQuery being available. This PR removes jQuery from the build which leads to 30kB (~10%; after gzip) less JS code shipped to the clients. @jtgeibel @carols10cents we might want to do a round of QA on the staging server for this to ensure that I haven't missed anything 🙏
2 parents 75f8211 + ac35004 commit 3cfa7a1

File tree

4 files changed

+14
-1243
lines changed

4 files changed

+14
-1243
lines changed

app/adapters/application.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,17 @@ export default RESTAdapter.extend({
1414

1515
return {};
1616
}),
17+
18+
handleResponse(status, headers, payload, requestData) {
19+
if (typeof payload === 'string') {
20+
try {
21+
payload = JSON.parse(payload);
22+
} catch (ignored) {
23+
// if the payload can't be parsed as JSON then let's continue
24+
// with the string payload
25+
}
26+
}
27+
28+
return this._super(status, headers, payload, requestData);
29+
},
1730
});

config/optional-features.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"application-template-wrapper": false,
3+
"jquery-integration": false,
34
"template-only-glimmer-components": true
45
}

0 commit comments

Comments
 (0)