waterthetrees / wtt_front

Water the Trees React frontend
https://waterthetrees.com
Creative Commons Zero v1.0 Universal
9 stars 24 forks source link

Lighthouse CI giving webpack errors with speed-measure-webpack-plugin #666

Open zoobot opened 1 year ago

zoobot commented 1 year ago

https://github.com/waterthetrees/wtt_front/actions/runs/4738740736/jobs/8412915864?pr=652

Tried to fix by changing this: return ifAnalyze(new SpeedMeasurePlugin().wrap({ ...config }), config); to this: return ifAnalyze(new SpeedMeasurePlugin().wrap(config), config);

https://github.com/waterthetrees/wtt_front/blob/d3edf116c96013095aee84ba97c4c87897e0cd36/webpack.config.js#L118

per this suggestion: https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/171

Possibly related things to look at:

https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/164

Might try this:

const smp = new SpeedMeasurePlugin();
module.exports = {
  webpack: smp.wrap({
    plugins: [
      //...
    ],
  }),
};

or just this:

const smp = new SpeedMeasurePlugin();
module.exports = {webpack: smp.wrap({plugins: config.plugins})};

https://github.com/stephencookdev/speed-measure-webpack-plugin/issues/174

zoobot commented 1 year ago

@PGrad just pinging you on here in case you've seen this before? I've tried one fix that worked locally but not with Lighthouse CI. Getting this warning after adding ReactRefreshWebpackPlugin. Any ideas on this one? I can work on it more later tomorrow.

zoobot commented 1 year ago

Tried this and still getting the warning:

return ifAnalyze(
    new SpeedMeasurePlugin().wrap({ plugins: config.plugins }),
    config,
  );
zoobot commented 1 year ago

hot-reload is no longer working and build is crashing on every change after recent lighthouse/storybook fix changes.

PGrad commented 1 year ago

I'm not seeing issues with hot reload on main, let's discuss today.