First of all, let's see what kind of framework project jeecg is.
Jeecg-Boot is an intelligent development platform based on code generator! Adopt front-end and back-end separation architecture: SpringBoot, Mybatis, Shiro, JWT, Vue&Ant Design. The powerful code generator allows one-click generation of front-end and back-end codes, without writing any code, and maintaining jeecg's consistent strength is definitely the gospel of full-stack development! ! While improving UI capabilities, JeecgBoot reduces the development cost of front-to-back separation. JeecgBoot also creates an original online development model (No Code concept), a series of online intelligent development: online configuration form, online configuration report, online chart design, online design process, etc. wait.
Recently, when developing the jeecg project, an error was reported TypeError: Class extends value undefined is not a constructor or null;
At that time, I wanted to package it into an official file. When I executed npm run build, I reported an error, and the error was as follows.
According to the error report, mini-css-extract-plugin
there is a problem with this plug-in, so I went to the npm official website of this plug-in to have a look. There are two solutions:
The first is to install this plugin
npm install --save-dev mini-css-extract-plugin //在项目开发依赖中安装
The second is to upgrade the webpack version (if it is invalid, you can uninstall it first and then install it):
npm install webpack -g // 全局安装
npm install webpack --save-dev //在项目开发依赖中安装
I used the first method to install the plug-in to solve it, and the pro-test is effective.
After completing the first step, run npm run build directly, and it will succeed directly.