[Pkg-javascript-devel] Bug#960901: Buffer is a built-in node function

Ben Finney bignose at debian.org
Tue Jun 16 07:04:19 BST 2020


On 16-Jun-2020, Ben Finney wrote:
> On 18-May-2020, Pirate Praveen wrote:
> > For this particular case you can try embedding buffer module
> > version 4.x as browsers need an equivalent module to features
> > present only in node.
> 
> This looks like advice for me to work around the problem. What do I
> need to do? How do I (as a user of Webpack) “embed buffer module
> version 4.x”?

Is this upstream issue related, does it have a solution?
<URL:https://github.com/webpack/webpack/issues/6913>. From that issue:

> This is because the mode ESM is applied to the Buffer polyfill. You
> must use include or exclude to only set the type for your source.

That discusses how to alter the code which uses “buffer”. I don't see
how to apply this to code which merely uses Webpack to bundle
libraries together.

-- 
 \      “Compulsory unification of opinion achieves only the unanimity |
  `\        of the graveyard.” —Justice Roberts in 319 U.S. 624 (1943) |
_o__)                                                                  |
Ben Finney <bignose at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20200616/34547791/attachment.sig>


More information about the Pkg-javascript-devel mailing list