We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
{ tag: "script", attrs: { type: "module", crossorigin: true, src: "app.config.js", }, injectTo: "head-prepend", }
使用这种方法插入script标签不起作用,我不知道啥原因,求大佬解惑 环境:vite5.1.4 + vite-plugin-html:3.2.2
创建插件代码:
createHtmlPlugin({ minify: false, entry: "src/main.ts", template: "index.html", inject: { data: { title: "xxx", favicon: "/static/images/layout-header-logo.svg", themeColor: defaultTheme.primaryColor, }, tags: htmlTags, }, verbose: true, }),
htmlTags 就是:
[ { tag: "script", attrs: { type: "module", crossorigin: true, src: "app.config.js", }, injectTo: "head-prepend", } ]
The text was updated successfully, but these errors were encountered:
一样,陪等
Sorry, something went wrong.
No branches or pull requests
创建插件代码:
htmlTags 就是:
The text was updated successfully, but these errors were encountered: