Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nats): change in the way nats is referenced
changed the way nats.ws is referenced according to document https://github.com/nats-io/nats.ws/blob/master/developer_notes.md
- Loading branch information
Showing
5 changed files
with
18 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
import { Config } from "bili"; | ||
|
||
const config: Config = { | ||
plugins: { | ||
typescript2: { | ||
tsconfigOverride: { | ||
include: ["src", "ethers"] | ||
} | ||
} | ||
}, | ||
extendConfig: config => ({ | ||
...config, | ||
// The default externals are the package.json dependencies and can only bundle node_modules that are not a dependency. | ||
// So need to clear out all externals, to bundle nats.ws package. | ||
externals: [] | ||
}), | ||
// nats.ws is bundled because using standard import/require does not work for cjs format. | ||
// nat.ws only provides a .mjs file which cannot be required. | ||
// include tslib for clients using older version of tslib | ||
bundleNodeModules: ["nats.ws", "tslib"], | ||
input: "src/iam-client-lib.ts", | ||
output: { | ||
format: ["cjs", "esm"], | ||
minify: false | ||
} | ||
plugins: { | ||
typescript2: { | ||
tsconfigOverride: { | ||
include: ["src", "ethers"], | ||
}, | ||
}, | ||
}, | ||
// include tslib for clients using older version of tslib | ||
bundleNodeModules: ["tslib"], | ||
input: "src/iam-client-lib.ts", | ||
output: { | ||
format: ["cjs", "esm"], | ||
minify: false, | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters