mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Move Buffer plugin into a single config snippet
This commit is contained in:
parent
b0dc01ccc6
commit
e2be44b27a
32
README.md
32
README.md
@ -96,7 +96,6 @@ We're happy to adjust this list according to users' needs as long as you don't
|
||||
ask for Internet Explorer support. If your environment does not support Wasm, we
|
||||
can work on a solution with swappable implementations.
|
||||
|
||||
|
||||
## Webpack Configs
|
||||
|
||||
With WebPack 5, you have to be explicit about the usage of Node.js types and
|
||||
@ -108,7 +107,14 @@ Configs for 0.28 and later:
|
||||
```js
|
||||
module.exports = [
|
||||
{
|
||||
// ...
|
||||
plugins: [
|
||||
...,
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
// ...
|
||||
resolve: {
|
||||
fallback: {
|
||||
buffer: false,
|
||||
@ -128,7 +134,14 @@ Configs for CosmJS < 0.28
|
||||
```js
|
||||
module.exports = [
|
||||
{
|
||||
// ...
|
||||
plugins: [
|
||||
...,
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
// ...
|
||||
resolve: {
|
||||
fallback: {
|
||||
buffer: false,
|
||||
@ -143,23 +156,6 @@ module.exports = [
|
||||
];
|
||||
```
|
||||
|
||||
Also, in both cases you need the Buffer plugin:
|
||||
|
||||
```ts
|
||||
module.exports = [
|
||||
{
|
||||
...,
|
||||
plugins: [
|
||||
...,
|
||||
new webpack.ProvidePlugin({
|
||||
Buffer: ["buffer", "Buffer"],
|
||||
}),
|
||||
],
|
||||
...
|
||||
},
|
||||
];
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
We maintain a [development board](https://github.com/orgs/cosmos/projects/6),
|
||||
|
Loading…
x
Reference in New Issue
Block a user