webpackbin icon indicating copy to clipboard operation
webpackbin copied to clipboard

Breaks on module 'slate'

Open natew opened this issue 7 years ago • 8 comments

Attempting to use package 'slate' breaks webpackbin unfortunately, works in browser.

natew avatar Apr 28 '17 21:04 natew

Hi @natew, you have some more info? I just tried it and it works?

christianalfoni avatar Apr 28 '17 21:04 christianalfoni

Oh, sorry, it is combining all three... slate, react and react-dom... that is certainly strange. It is probably picking up some invalid entry point. Have to check

christianalfoni avatar Apr 28 '17 21:04 christianalfoni

Super strange... only place I find base64-js is inside the "dist/slate.js" file, but that is being completely ignored. Makes no sense any of that code being included, hm

christianalfoni avatar Apr 28 '17 22:04 christianalfoni

Okay... this is surprisingly difficult to figure out. Even made a records.json file... no record of looking into that file. But... what is this dist stuff anyways? Why does it depend on base64-js? Seems to be something else than the lib itself? It does not depend on it in package.json either?

christianalfoni avatar Apr 28 '17 22:04 christianalfoni

Sorry to hear its so weird! Not my package, just one I use. Thanks for making webpackbin, it's really impressive!

natew avatar Apr 28 '17 23:04 natew

I even tried deleting the dist folder before bundling... still asks for base64-js. Insanely weird

christianalfoni avatar Apr 28 '17 23:04 christianalfoni

Okay, I think I found issue... cheerio, dep of slate, uses readable-stream, which uses buffer-shim, which uses buffer... a node core module. There is a webpack config to turn off some buffer stuff, but then we end up with: dll.js:26 Uncaught Error: Cannot find module "../maps/decode.json"

Maaan, this is bugging me so much! :-D

christianalfoni avatar Apr 29 '17 00:04 christianalfoni

Sorry, have to give this up :( I did find some interesting things related to generally mocking stuff, so picked that up at least. It is rather strange because this service does use json loader to handle that, but for some reason this deep dependency is not hit.

Thanks for feedback :)

christianalfoni avatar Apr 29 '17 00:04 christianalfoni