Skip to content

在 monorepo 中,如果 template/index.html 位于其他包中,build 会报错 #159

Description

@baijunjie

directory

packages/common/template/index.html
packages/project/vue.config.js

vue.config.js plugin config

createHtmlPlugin({
  minify: false,
  entry: path.resolve(__dirname, 'src/main.js'),
  filename: 'index.html',
  template: path.resolve(__dirname, '../common/template/index.html'),
}),

build error

[vite:build-html] The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "../common/template/index.html".

version
vite: 5.3.4
vite-plugin-html: 3.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions