Skip to content

Commit

Permalink
revert babel plugin change
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Dec 28, 2024
1 parent 3011839 commit 80ab655
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/plugin-babel/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@ class BabelResource extends ResourceInterface {
this.contentType = ['text/javascript'];
}

async shouldPreIntercept(url, request, response) {
const { protocol, pathname } = url;

return protocol === 'file:'
&& !pathname.startsWith('/node_modules/')
&& response.headers.get('Content-Type').indexOf(this.contentType) >= 0;
async shouldPreIntercept(url) {
return url.pathname.split('.').pop() === this.extensions[0] && !url.pathname.startsWith('/node_modules/');
}

async preIntercept(url, request, response) {
Expand Down

0 comments on commit 80ab655

Please sign in to comment.