Skip to content
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

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

Open
baijunjie opened this issue Aug 16, 2024 · 0 comments

Comments

@baijunjie
Copy link

baijunjie commented Aug 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant