Skip to content

Commit

Permalink
Merge branch 'main' into css-ast
Browse files Browse the repository at this point in the history
  • Loading branch information
swc-bot committed Dec 9, 2022
2 parents 5a89d9c + 394141b commit c4c4e1b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
- **(es/typescript)** Strip inline type declarations (#6600) ([fe0c651](https://github.com/swc-project/swc/commit/fe0c65195d2308b1475e958a7051b5f529bf4580))


- **(node-swc)** Sync types for `jsc.optimizer.globals` (#6603) ([b97aa45](https://github.com/swc-project/swc/commit/b97aa45c5c0ef5cfccc15294767c2bc8f0a7307d))


- **(xml/parser)** Fix parsing of legacy document types (#6555) ([cdf0d8a](https://github.com/swc-project/swc/commit/cdf0d8a8b59a05498b6ca609d8a2ecf3c2f35f28))


Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/dbg-swc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license = "Apache-2.0"
name = "dbg-swc"
repository = "https://github.com/kdy1/dbg-swc.git"
version = "0.59.15"
version = "0.59.16"

[[bin]]
bench = false
Expand Down
13 changes: 10 additions & 3 deletions node-swc/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,18 +879,25 @@ export interface OptimizerConfig {
*/
export interface GlobalPassOption {
/**
* Global variables.
* Global variables that should be inlined with passed value.
*
* e.g. `{ __DEBUG__: true }`
*/
vars?: { [key: string]: string };
vars?: Record<string, string>;

/**
* Name of environment variables to inline.
* Names of environment variables that should be inlined with the value of corresponding env during build.
*
* Defaults to `["NODE_ENV", "SWC_ENV"]`
*/
envs?: string[];

/**
* Replaces typeof calls for passed variables with corresponding value
*
* e.g. `{ window: 'object' }`
*/
typeofs?: Record<string, string>;
}

export type ModuleConfig = Es6Config | CommonJsConfig | UmdConfig | AmdConfig | NodeNextConfig | SystemjsConfig;
Expand Down

0 comments on commit c4c4e1b

Please sign in to comment.