Skip to content

multi-page template fallback differs from doc #1679

Closed
@MarvinXu

Description

@MarvinXu

Version

3.0.0-rc.3

Reproduction link

https://github.com/MarvinXu/vue-cli-mpa-test

Steps to reproduce

vue inspect > out.js

see this fragment:

// out.js

/* config.plugin('html-subpage') */
    new HtmlWebpackPlugin(
      {
        templateParameters: function () { /* omitted long function */ },
        chunks: [
          'chunk-vendors',
          'chunk-common',
          'subpage'
        ],
        template: 'E:\\workspace2018\\vue-cli-mpa-test\\node_modules\\@vue\\cli-service\\lib\\config\\index-default.html',
        filename: 'subpage.html'
      }
    )

What is expected?

https://cli.vuejs.org/config/#pages

"when using the entry-only string format, template is inferred to be public/subpage.html and falls back to public/index.html if not found."

What is actually happening?

subpage's template did not fall back to 'public/index.html' but some other default template in node_modules.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions