webpack-lighthouse-plugin icon indicating copy to clipboard operation
webpack-lighthouse-plugin copied to clipboard

TypeError: Cannot read property 'afterEmit' of undefined

Open jacobtyq opened this issue 5 years ago • 1 comments

After installing the plugin via yarn, and importing it into my development.js config, I get this error TypeError: Cannot read property 'afterEmit' of undefined when I run webpack-dev-server --hot

I am using this plugin in a rails app using webpacker.

My webpacker version: "@rails/webpacker": "^3.5.3"

And here's my development.js config

process.env.NODE_ENV = process.env.NODE_ENV || 'development'

const environment = require('./environment')
const WebpackLighthousePlugin = require('webpack-lighthouse-plugin')

environment.plugins.append(
  'WebpackLighthousePlugin',
  new WebpackLighthousePlugin({
    url: 'http://localhost:3000'
  })
)

module.exports = environment.toWebpackConfig()

Do I need to upgrade webpacker? Saw a similar issue over here for another plugin

jacobtyq avatar Apr 10 '19 08:04 jacobtyq

Which webpack version is webpacker using?

evenstensberg avatar Apr 11 '19 10:04 evenstensberg