Vue item reports error webpackjsonp is not defined

In Vue single page applications, we will probably use the plug-in Commons chunkplugin. Portal   CommonsChunkPlugin  

However, after the project passes the local test, there is no problem, but an error will be reported after it is packaged and put online   webpackJsonp is not defined。 This is because the public file must be referenced before the JS file it references

You can manually change the file reference, but the following solutions are recommended:  

Find build → → find the htmlwebpackplugin plug-in, and add the following configuration

chunks: ['manifest', 'vendor', 'app']

Similar Posts: