@web/dev-server-esbuild
Advanced tools
Comparing version 0.2.3 to 0.2.4
# @web/dev-server-esbuild | ||
## 0.2.4 | ||
### Patch Changes | ||
- be76d89: exposed strict option for esbuild | ||
## 0.2.3 | ||
@@ -4,0 +10,0 @@ |
import { Context, Plugin, Logger, DevServerCoreConfig } from '@web/dev-server-core'; | ||
import { Loader } from 'esbuild'; | ||
import { Loader, Strict } from 'esbuild'; | ||
export interface EsbuildConfig { | ||
@@ -10,2 +10,3 @@ loaders: Record<string, Loader>; | ||
jsxFragment?: string; | ||
strict?: boolean | Strict[]; | ||
define?: { | ||
@@ -12,0 +13,0 @@ [key: string]: string; |
@@ -128,4 +128,10 @@ "use strict"; | ||
target, | ||
// use strict class fields when not compiling TS | ||
strict: ['ts', 'tsx'].includes(loader) ? [] : ['class-fields'], | ||
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, | ||
@@ -132,0 +138,0 @@ jsxFragment: this.esbuildConfig.jsxFragment, |
{ | ||
"name": "@web/dev-server-esbuild", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -9,3 +9,3 @@ import { | ||
} from '@web/dev-server-core'; | ||
import { startService, Service, Loader, Message } from 'esbuild'; | ||
import { startService, Service, Loader, Message, Strict } from 'esbuild'; | ||
import { promisify } from 'util'; | ||
@@ -42,2 +42,3 @@ import path from 'path'; | ||
jsxFragment?: string; | ||
strict?: boolean | Strict[]; | ||
define?: { [key: string]: string }; | ||
@@ -185,4 +186,10 @@ } | ||
target, | ||
// use strict class fields when not compiling TS | ||
strict: ['ts', 'tsx'].includes(loader) ? [] : ['class-fields'], | ||
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, | ||
@@ -189,0 +196,0 @@ jsxFragment: this.esbuildConfig.jsxFragment, |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
49828
20351
807
0