mirror of https://github.com/waku-org/js-waku.git
feat: all buffer dependencies have been removed
This commit is contained in:
parent
b7fa4d375a
commit
187287a28c
|
@ -1,52 +1,37 @@
|
|||
const modifyWebpackConfig = (webpackConfig) => {
|
||||
if (!webpackConfig.resolve) webpackConfig.resolve = {};
|
||||
if (!webpackConfig.resolve.fallback) webpackConfig.resolve.fallback = {};
|
||||
// Can be removed once https://github.com/libp2p/js-libp2p-pubsub/pull/92 is merged and released
|
||||
webpackConfig.resolve.fallback.buffer = false;
|
||||
return webpackConfig;
|
||||
};
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
name: "Waku core",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ Waku }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
{
|
||||
name: "Waku default setup",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ createWaku, waitForRemotePeer }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
{
|
||||
name: "Asymmetric, symmetric encryption and signature",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ waku_message }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
{
|
||||
name: "DNS discovery",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ discovery }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
{
|
||||
name: "Privacy preserving protocols",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ WakuRelay }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
{
|
||||
name: "Light protocols",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ WakuLightPush, WakuFilter }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
{
|
||||
name: "History retrieval protocols",
|
||||
path: "dist/bundle.min.js",
|
||||
import: "{ WakuStore }",
|
||||
modifyWebpackConfig,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- Bump many libp2p libraries to their latest version (which usually are pure ESM).
|
||||
- Replace webpack with parcel for bundling
|
||||
- Examples: Updated store-js and relay-js to demonstrate usage of ESM bundle in `<script>` tag.
|
||||
- Remove need for buffer polyfilling, however it may still be needed to set `buffer: false` in your bundler.
|
||||
- Remove need to polyfill `buffer`.
|
||||
- **breaking**: Various API changes. Refer to tests to check proper usage of the new API.
|
||||
|
||||
### Fix
|
||||
|
|
|
@ -42,10 +42,6 @@ module.exports = function (config) {
|
|||
],
|
||||
resolve: {
|
||||
extensions: [".ts", ".js"],
|
||||
fallback: {
|
||||
// Can be removed once https://github.com/libp2p/js-libp2p-pubsub/pull/92 is merged and released
|
||||
buffer: false,
|
||||
},
|
||||
},
|
||||
stats: { warnings: false },
|
||||
},
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
"reset-hard": "git clean -dfx && git reset --hard && npm i && npm run build && for d in examples/*/; do (cd $d; npm i); done"
|
||||
},
|
||||
"browser": {
|
||||
"buffer": false,
|
||||
"crypto": false
|
||||
},
|
||||
"engines": {
|
||||
|
|
Loading…
Reference in New Issue