Closed EECOLOR closed 4 years ago
@EECOLOR problem still exists?
Example:
https://github.com/webpack-contrib/file-loader/blob/master/src/index.js#L85 https://github.com/webpack-contrib/file-loader/blob/master/src/index.js#L79 https://github.com/webpack/webpack/blob/master/lib/NormalModule.js#L191 https://github.com/webpack/webpack/blob/master/lib/NormalModule.js#L138
@EECOLOR can you create minimum reproducible test repo?
@evilebottnawi Just create a RawSource
with a buffer as value
and call node
on it
@EECOLOR sorry for big delay, I think it is expected, you need to use RawSource(Buffer.from('test'), true)
@evilebottnawi The issue seems to have been fixed 11 months ago: https://github.com/webpack/webpack-sources/commit/4e1ea6d9be702d822078b0494b192ad06ecfbd11#diff-80d25e3b0eed8830fe06f2bad53a54b6R46
Which can easily happen in webpack, file-loader for example emits files as buffer instances.