IndexXuan / vue-cli-plugin-vite

Use vite today, with vue-cli.

Home Page:https://github.com/IndexXuan/vue-cli-plugin-vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MPA cannot run normally!

Jurool opened this issue · comments

SPA can start normally, but MPA is not.
I can't find any abnormalities, please help me, thank you.

Node: v12.22.1

Demo created by @vue/cli(4.5.13) here.

image

And the automatic open page link is http://localhost:3000/undefined/index.html.

The console has an error:
image

This is the network request panel:
image

rename app to pages. it is vue-cli spec.

rename app to pages. it is vue-cli spec.

Are you talking about the folder name? I tried it and it still doesn't work.
image

sorry too busy these days. the entry should be main.js/ts. yours is index.ts. I will clone your repro. also you can see the examples folder. It has MPA demo.

sorry too busy these days. the entry should be main.js/ts. yours is index.ts. I will clone your repro. also you can see the examples folder. It has MPA demo.

It works. The entry file should be main.ts. LOL

@Jurool
vue-cli SPA entry file must be main.{js,ts}, while MPA maybe can use others(but I am not support it right now). maybe somedays, not very hard.

@Jurool
vue-cli SPA entry file must be main.{js,ts}, while MPA maybe can use others(but I am not support it right now). maybe somedays, not very hard.

Got it.