@web/dev-server-esbuild
Advanced tools
Comparing version 0.2.6 to 0.2.8
# @web/dev-server-esbuild | ||
## 0.2.8 | ||
### Patch Changes | ||
- 28890a0: update to latest esbuild | ||
## 0.2.6 | ||
@@ -4,0 +10,0 @@ |
import { Context, Plugin, Logger, DevServerCoreConfig } from '@web/dev-server-core'; | ||
import { Loader, Strict } from 'esbuild'; | ||
import { Loader } from 'esbuild'; | ||
export interface EsbuildConfig { | ||
@@ -10,3 +10,2 @@ loaders: Record<string, Loader>; | ||
jsxFragment?: string; | ||
strict?: boolean | Strict[]; | ||
define?: { | ||
@@ -13,0 +12,0 @@ [key: string]: string; |
@@ -124,3 +124,3 @@ "use strict"; | ||
try { | ||
const { js, warnings } = await this.service.transform(code, { | ||
const { code: transformedCode, warnings } = await this.service.transform(code, { | ||
sourcefile: filePath, | ||
@@ -130,10 +130,2 @@ sourcemap: 'inline', | ||
target, | ||
strict: | ||
// use user defined strict config, otherwise default to strict class fields | ||
// unless we are transforming TS which does not use strict class fields | ||
this.esbuildConfig.strict | ||
? this.esbuildConfig.strict | ||
: ['ts', 'tsx'].includes(loader) | ||
? [] | ||
: ['class-fields'], | ||
jsxFactory: this.esbuildConfig.jsxFactory, | ||
@@ -150,3 +142,3 @@ jsxFragment: this.esbuildConfig.jsxFragment, | ||
} | ||
return js; | ||
return transformedCode; | ||
} | ||
@@ -153,0 +145,0 @@ catch (e) { |
{ | ||
"name": "@web/dev-server-esbuild", | ||
"version": "0.2.6", | ||
"version": "0.2.8", | ||
"publishConfig": { | ||
@@ -17,2 +17,8 @@ "access": "public" | ||
"main": "dist/index.js", | ||
"exports": { | ||
".": { | ||
"import": "./index.mjs", | ||
"require": "./dist/index.js" | ||
} | ||
}, | ||
"engines": { | ||
@@ -48,21 +54,15 @@ "node": ">=10.0.0" | ||
"dependencies": { | ||
"@mdn/browser-compat-data": "^2.0.2", | ||
"@mdn/browser-compat-data": "^2.0.7", | ||
"@web/dev-server-core": "^0.2.2", | ||
"esbuild": "^0.7.15", | ||
"esbuild": "^0.8.12", | ||
"parse5": "^6.0.1", | ||
"ua-parser-js": "^0.7.21" | ||
"ua-parser-js": "^0.7.22" | ||
}, | ||
"devDependencies": { | ||
"@types/ua-parser-js": "^0.7.33", | ||
"es-dev-server": "^1.55.0", | ||
"lit-element": "^2.3.1", | ||
"node-fetch": "v3.0.0-beta.9", | ||
"preact": "^10.4.4" | ||
}, | ||
"exports": { | ||
".": { | ||
"import": "./index.mjs", | ||
"require": "./dist/index.js" | ||
} | ||
"es-dev-server": "^1.57.8", | ||
"lit-element": "^2.4.0", | ||
"node-fetch": "3.0.0-beta.9", | ||
"preact": "^10.5.7" | ||
} | ||
} |
@@ -9,3 +9,3 @@ import { | ||
} from '@web/dev-server-core'; | ||
import { startService, Service, Loader, Message, Strict } from 'esbuild'; | ||
import { startService, Service, Loader, Message } from 'esbuild'; | ||
import { promisify } from 'util'; | ||
@@ -43,3 +43,2 @@ import path from 'path'; | ||
jsxFragment?: string; | ||
strict?: boolean | Strict[]; | ||
define?: { [key: string]: string }; | ||
@@ -182,3 +181,3 @@ } | ||
try { | ||
const { js, warnings } = await this.service!.transform(code, { | ||
const { code: transformedCode, warnings } = await this.service!.transform(code, { | ||
sourcefile: filePath, | ||
@@ -188,10 +187,2 @@ sourcemap: 'inline', | ||
target, | ||
strict: | ||
// use user defined strict config, otherwise default to strict class fields | ||
// unless we are transforming TS which does not use strict class fields | ||
this.esbuildConfig.strict | ||
? this.esbuildConfig.strict | ||
: ['ts', 'tsx'].includes(loader) | ||
? [] | ||
: ['class-fields'], | ||
jsxFactory: this.esbuildConfig.jsxFactory, | ||
@@ -213,3 +204,3 @@ jsxFragment: this.esbuildConfig.jsxFragment, | ||
return js; | ||
return transformedCode; | ||
} catch (e) { | ||
@@ -216,0 +207,0 @@ if (Array.isArray(e.errors)) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49571
796
+ Addedesbuild@0.8.57(transitive)
- Removedesbuild@0.7.22(transitive)
Updatedesbuild@^0.8.12
Updatedua-parser-js@^0.7.22