Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Webpack 5 support #32

Open
Bilge opened this issue Jun 24, 2021 · 1 comment
Open

Webpack 5 support #32

Bilge opened this issue Jun 24, 2021 · 1 comment
Milestone

Comments

@Bilge
Copy link

Bilge commented Jun 24, 2021

It seems this loader is not compatible with webpack 5. When using with Storybook, my story gives ReferenceError: Buffer is not defined. Not sure what that means as I cannot see any line referencing Buffer, but I guess the point here is just that webpack 5 compatibility is needed.

@henrijs
Copy link

henrijs commented Jan 11, 2024

Not twing-loader issue. Add Buffer plugin from webpack. Like this (sorry, this is half-assed answer, just browsing past, this is one of webpack config files that plugs in webpackFinal key in Storybook main.js)

const webpack = require('webpack');

const bufferPlugin = new webpack.ProvidePlugin({
  Buffer: ['buffer', 'Buffer'],
});

module.exports = {
  bufferPlugin,
};

@ericmorand ericmorand added this to the 5.0.0 milestone Mar 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants