addyosmani / addyosmani/webpack-lighthouse-plugin

TypeError: Cannot read property 'afterEmit' of undefined

未关闭
#18 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
294
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

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](https://github.com/MikaAK/s3-plugin-webpack/issues/105) for another plugin

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。