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

TypeError: Cannot read property 'afterEmit' of undefined #18

Open
jacobtyq opened this issue Apr 10, 2019 · 1 comment
Open

TypeError: Cannot read property 'afterEmit' of undefined #18

jacobtyq opened this issue Apr 10, 2019 · 1 comment

Comments

@jacobtyq
Copy link

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

@evenstensberg
Copy link
Collaborator

Which webpack version is webpacker using?

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