ERROR in compilation.getAssets is not a function

date
Jan 10, 2023
slug
ERROR-in-compilation-getAssets-is-not-a-function
status
Published
tags
Bugfix
Webpack
summary
type
Post

Background

I had a project with Node packages below:

Problem

When I tried to build the project with Webpack build script
I got the error bellow:

Solution

There are two ways to fix that problem:
  1. Update Webpack version to at least 4.40.0
    1. getAssets is only available since Webpack 4.40.0.
  1. Downgrade min-css-extract-plugin to 1.3.0
    1. to be

References


© Foy Wan 2022 - 2025