ijs / webp-webpack-plugin

webpack plugin for making webp format file
https://ijs.github.io/webp-webpack-plugin/
MIT License
40 stars 7 forks source link

Build Failed: TypeError: next is not a function #8

Open wusatosi opened 6 years ago

wusatosi commented 6 years ago

DESC

Building my project with the plugin... Config is just copy & pasted from document. Than it failed.........

ENV

npm -version 5.6.0

webp-webpack-plugin ^1.2.6

html-webpack-plugin ^3.2.0

OS Platform: Windows 10

webpack Version: ^4.16.0

code

Configuration file plugin section:

new WebPWebpackPlugin(
    {
        match: /(jpe?g|png)$/,
        webp: {
            quality: 80,
            inject: true, // inject the default runtime code
            injectCode: '' // inject your code
        }
    }
),

Exactly the same as the README shows.

error message

TypeError: next is not a function
  188:7  error  - index.js:96
                [Blog-Frontend]/[webp-webpack-plugin]/dist/index.js:      -
                Generator.next      - index.js:3 step
                [Blog-Frontend]/[webp-webpack-plugin]/dist/index.js:3:191      -
                index.js:3
                [Blog-Frontend]/[webp-webpack-plugin]/dist/index.js:3:437      - new
                Promise      - index.js:3
                [Blog-Frontend]/[webp-webpack-plugin]/dist/index.js:3:99      -
                index.js:100 compilation.plugin
                [Blog-Frontend]/[webp-webpack-plugin]/dist/index.js:100:26         -
                new Promise         - Hook.js:35
                AsyncSeriesWaterfallHook.lazyCompileHook [as _promise]
                [Blog-Frontend]/[tapable]/lib/Hook.js:35:21      - index.js:673
                [Blog-Frontend]/[html-webpack-plugin]/index.js:673:47      -
                index.js:187
                Promise.resolve.then.then.then.then.then.then.then.result
                [Blog-Frontend]/[html-webpack-plugin]/index.js:187:18         -
                next_tick.js:188 process._tickCallback

more description

Nop

other

Nothing emmmmmmmmmmmmm

Oromis commented 5 years ago

This is project doesn't seem to support Webpack 4 at the moment. I also stumbled across this problem.

jiangtao commented 5 years ago

Sorry, this package doesn't support webpack 4 now. I will support it in the feature. And welcome to pull requests to support it.