Skip to content

It always uses index-default.html when give template property #2697

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fengxinming opened this issue Oct 9, 2018 · 9 comments · Fixed by #5997
Closed

It always uses index-default.html when give template property #2697

fengxinming opened this issue Oct 9, 2018 · 9 comments · Fixed by #5997

Comments

@fengxinming
Copy link

Version

3.0.4

Reproduction link

https://github.com/fengxinming/vuecli3-demo

Node and OS info

node v8.11.1, npm 6.4.1, macOS

Steps to reproduce

npm i
npm run build

What is expected?

public/index.pug is compiled to dist/index.html

What is actually happening?

index-default.html is compiled to dist/index.html


190 // resolve page index template
191 const hasDedicatedTemplate = fs.existsSync(api.resolve(template))
192 if (hasDedicatedTemplate) {
193 publicCopyIgnore.push(template)
194 }

if I use pug template as property template, then hasDedicatedTemplate still can be false

@LinusBorg
Copy link
Member

That feature of html-webpack-plugin is currently not supported. I'll mark it as a possible enhancement.

@fengxinming
Copy link
Author

@LinusBorg when are you gonna solve this issue

@LinusBorg
Copy link
Member

I currently don't plan on working on this, it's pretty low priority.

If you want to work on it, go ahead - I explicitly marked it as "constribution welcome"

@KancerEzeroglu
Copy link

Hi, is somebody working on this issue? If not, I would like to work on it.

@LinusBorg
Copy link
Member

It seems to be free, so go ahead!

Thanks! :)

@KancerEzeroglu
Copy link

Hi @LinusBorg ,

Do you have any suggestion for a starting point?
Today I have a chance to have a look.

@fengxinming
Copy link
Author

@KancerEzeroglu 看这个文件 packages/@vue/cli-service/lib/config/app.js 里的第148行代码,有两部分配置,一部分是多页配置;另一部分是单页配置。

@fengxinming
Copy link
Author

@KancerEzeroglu You may find the line 148 of that file packages/@vue/cli-service/lib/config/app.js which starts to resolve HTML files.

@jeneser
Copy link
Contributor

jeneser commented Jun 8, 2020

Any progress? @fengxinming Can you update the reproduction link?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment