Our company has three environments: dev, test and production. When I package the upload in dev environment, it works fine in dev environment. However, the problem is displayed in the Test environment

I am using elementUI and if according to the front-end framework, thank you for your contribution to the liberation of front-end productivity;

After comparing the dev /dist/index.html package with the test /dist/index.html package, I found that at the bottom of the index.html they refer to different js file paths, so I suspected that there was something different in the packaging configuration.

Go to the vue. Config. Js

'production' is not configured in dev, but 'production' is configured in test and prod.
publicPath: process.env.NODE_ENV === "production" ? "/system-ui/" : "/".// To solve the problem and to unify the environment, I removed the '/system-ui' completely.
publicPath: "/".Copy the code

Packaging the changes in the Test environment solves this problem

May appear this one problem has a variety of circumstances, I only encountered this one situation, also provides this one solution to the problem.

Sure enough, fixing bugs and problems is the best way to improve yourself.