Skip to content

Tapable is deprecated in Webpack 4 #194

@FossPrime

Description

@FossPrime

webpack/webpack#6568 (comment)

Here's the trace with process.traceDeprecation = true a top of webpack.base.conf.js

(node:97338) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at Object.<anonymous> (/Volumes/git/x-web/build/dev-server.js:42:10)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:744:10)
    at startup (internal/bootstrap/node.js:240:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:564:3)

Line 41+ of dev-server

// force page reload when html-webpack-plugin template changes
compiler.plugin('compilation', function (compilation) {
  compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
    hotMiddleware.publish({ action: 'reload' })
    cb()
  })
})

The solution seems to be compiler.hooks.done.tap('compilation', function (compilation) { though I'm really unsure about what any of this is for

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions