8000
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
3.8.6
win11
function base64ToUint8Array(base64String) { let padding = '='.repeat((4 - base64String.length % 4) % 4) let base64 = (base64String + padding) .replace(/-/g, '+') .replace(/_/g, '/') let rawData = atob(base64) let outputArray = new Uint8Array(rawData.length) for (let i = 0; i < rawData.length; i++) { outputArray[i] = rawData.charCodeAt(i) } return outputArray }
我的web构建模板index.ejs中有如上代码,开启md5构建后,生成的index.html文件,会将 .replace(/_/g, '/') 这行代码改为 .replace(/_/g, index.e0743.js'/'),即自动带上了 index脚本地址,导致语法错误。 经过排查发现构建后会把代码中包含 '/' 的地方都替换上index脚本地址,这个做法也是???
No response
新建个web构建模板,加上上述代码
The text was updated successfully, but these errors were encountered:
没有复现你说的问题
如果你用的是 html 构建模板是可能会,可以关闭这个实验室功能
Sorry, something went wrong.
<script type="text/javascript"> function base64ToUint8Array(base64String) { let padding = '='.repeat((4 - base64String.length % 4) % 4) let base64 = (base64String + padding) .replace(/-/g, '+') .replace(/_/g, '/') let rawData = atob(base64) let outputArray = new Uint8Array(rawData.length) for (let i = 0; i < rawData.length; i++) { outputArray[i] = rawData.charCodeAt(i) } return outputArray } </script>
代码放到script标签里啊
不仅是index.ejs里的会被更改,放在构建模板中的脚本文件 中的 / 字符也会被更改
No branches or pull requests
Cocos Creator version
3.8.6
System information
win11
Issue description
我的web构建模板index.ejs中有如上代码,开启md5构建后,生成的index.html文件,会将 .replace(/_/g, '/') 这行代码改为 .replace(/_/g, index.e0743.js'/'),即自动带上了 index脚本地址,导致语法错误。
经过排查发现构建后会把代码中包含 '/' 的地方都替换上index脚本地址,这个做法也是???
Relevant error log output
No response
Steps to reproduce
新建个web构建模板,加上上述代码
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: