a plurality of inlets vue

When do VUE project, sometimes multiple inlets want to solve some problems.

Copy in the root directory of a index.html, whatever you name names, of course, you are also into a folder, called my index1.html

Then App.vue also copy, I also called App1.vue

Then main.js also copy one point, I also was named main1.js

In main1 inside to change the

import App from "./App";

Changed

import App from "./App1";

Other can not change.

Then to the build folder inside.

webpack.base.conf.js a file entry in the entry is added, as shown in

plugins webpack.dev.conf.js files which also add a piece of code, how red box

Then add a code webpack.prod.conf.js file plugins inside, red box shown how

Finally index.js config folder inside a request to add build inside, shown in FIG.

So far. . A plurality of inlet configuration has been completed.

After npm run build inlet generates two files, index.html and index1.html.

In the browser, you can use two addresses to access, for example, I was

http: // localhost: 8080 / # / is the default address,

May be http: // localhost: 8080 / index1.html # /

Guess you like

Origin www.cnblogs.com/huzhuhua/p/11202565.html