Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't Webpack #8

Open
StarrHelixx opened this issue May 12, 2021 · 1 comment
Open

Can't Webpack #8

StarrHelixx opened this issue May 12, 2021 · 1 comment

Comments

@StarrHelixx
Copy link

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants