-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
index.html 在build的时候需要忽略里面的一些处理 #7160
Comments
Maybe you can try using my plugin https://www.npmjs.com/package/vite-plugin-public-path |
During the build process, vite will collect resource urls to generate |
你的实现是在 generateBundle 实现的 这个错误在 resolveId 之后就出现异常了 |
@menkeydyvh 用我的插件的话,你需要去掉 不过有个问题是,我的插件是对全站所有资源生效的,如果只希望一部分走 CDN 的话就不适用了。 |
如果实在没办法处理就自己写插件了。 话说你会中文 干啥刚开始还写英文给我 我还要翻译一下都看不懂 |
try
|
Describe the bug
index.html 里面使用了服务端参数 {{cdnHost}} 在使用服务端参数的时候 会在build的时候被处理报错,希望能不对这个link处理,或者能配置忽略,当然我开发和build是分开两个index.html的
index.html
error
异常提示的 ‘build.rollupOptions.external’ 会在build的时候被忽略掉这一行也不是我想要的结果
Reproduction
这个不需要提供把看下错误就知道了
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: