Can't Webpack
Opened this issue · 1 comments
StarrHelixx commented
Hey, thanks for developing this library! I'm trying to implement it in my app so I can check the duration of WebP files. However, I seem to be having an issue getting my build to work properly, as I get the following error:
ERROR in ./node_modules/node-webpmux/webp.js 59:7
Module parse failed: Unexpected token (59:7)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| }
| class WebPReader {
> type = intfTypes.NONE;
| readFile(path) { this.type = intfTypes.FILE; this.path = path; }
| readBuffer(buf) { this.type = intfTypes.BUFFER; this.buf = buf; this.cursor = 0; }
@ ./src/renderer/components/player/ImagePlayer.tsx 6:0-32 681:30-34
@ ./src/renderer/components/player/SourceScraper.tsx
@ ./src/renderer/components/player/Player.tsx
@ ./src/renderer/components/Meta.tsx
@ ./src/renderer/renderer.tsx
I'm not sure what it is about that line which is messing up my webpack .... any ideas?
ApeironTsuka commented
My guess is the Webpack parser doesn't know how to handle field declarations. I'll push a quick change (they're basically just shorthand so I don't need a constructor) and see if it works for you.