Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-loader

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-loader - npm Package Compare versions

Comparing version 2.9.1 to 2.9.2

20

dist/loader.js

@@ -24,3 +24,3 @@ "use strict";

});
const tsxTryTsLoaderPtrn = /Unexpected|Expected/;
const isTsExtensionPtrn = /\.ts$/i;
let tsConfig;

@@ -51,14 +51,10 @@ async function ESBuildLoader(source) {

}
// https://github.com/privatenumber/esbuild-loader/pull/107
if (transformOptions.loader === 'tsx'
&& isTsExtensionPtrn.test(this.resourcePath)) {
transformOptions.loader = 'ts';
}
try {
const result = await service.transform(source, transformOptions).catch(async (error) => {
// Target might be a TS file accidentally parsed as TSX
if (transformOptions.loader === 'tsx' && tsxTryTsLoaderPtrn.test(error.message)) {
transformOptions.loader = 'ts';
return service.transform(source, transformOptions).catch(_ => {
throw error;
});
}
throw error;
});
done(null, result.code, result.map && JSON.parse(result.map));
const { code, map } = await service.transform(source, transformOptions);
done(null, code, map && JSON.parse(map));
}

@@ -65,0 +61,0 @@ catch (error) {

3

package.json
{
"name": "esbuild-loader",
"version": "2.9.1",
"version": "2.9.2",
"description": "⚡️ Speed up your Webpack build with esbuild",

@@ -14,2 +14,3 @@ "keywords": [

"repository": "privatenumber/esbuild-loader",
"funding": "https://github.com/privatenumber/esbuild-loader?sponsor=1",
"author": {

@@ -16,0 +17,0 @@ "name": "Hiroki Osame",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc