osmosis-labs / osmojs

OsmosJS makes it easy to compose and broadcast Osmosis and Cosmos messages
https://cosmology.zone/products/osmojs
Apache License 2.0
63 stars 32 forks source link

Does not work inside Chrome extension #49

Closed baoskee closed 1 year ago

baoskee commented 1 year ago

I got a ChunkLoadError inside a Chrome extension using Next.js. For some reason, the browser cannot load the chunk file even though it is created inside the folder.

The full chunk file is attached at bottom.

ChunkLoadError: Loading chunk 322 failed.
(error: chrome-extension://kgbklofchanpakafplbfaddoohgkaccm/_next/static/chunks/322.d3420e7c66971756.js)
    at f.f.j (webpack-fba7874665b47c5e.js:1:2830)
    at webpack-fba7874665b47c5e.js:1:933
    at Array.reduce (<anonymous>)
    at f.e (webpack-fba7874665b47c5e.js:1:899)
    at fU (787-e567954d7f9c47a5.js:3:3046589)
    at async index-943db5bdc3e8ef68.js:1:35124
    at async index-943db5bdc3e8ef68.js:1:34840
index-943db5bdc3e8ef68.js:1 

Here is my webpack.config.js:

 plugins: [
    new webpack.ProvidePlugin({
      Buffer: ["buffer", "Buffer"],
    }),
  ],
  resolve: {
    extensions: [".ts", ".js"],
    fallback: {
      buffer: false,
      crypto: false,
      events: false,
      path: false,
      stream: false,
      string_decoder: false,
    },
  },

322.d3420e7c66971756.js.zip

baoskee commented 1 year ago

Webpack error on my part.