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

vite build drop_console:true de.log is not a fuction #138

Open
onlyleeq opened this issue Sep 8, 2023 · 10 comments
Open

vite build drop_console:true de.log is not a fuction #138

onlyleeq opened this issue Sep 8, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@onlyleeq
Copy link

onlyleeq commented Sep 8, 2023

vue3+vite3 打包drop_console设置为true报错de.log is not a fuction
image
image

@Ezviz-Open
Copy link
Member

Ezviz-Open commented Sep 8, 2023 via email

@Sunrisies
Copy link

解决了吗?
我也遇到了

@freeshineit
Copy link
Collaborator

先把这个 drop_console 注释试一下 或者忽略 ezuikit.js, 这是第三方的库一个问题。 后面看一下怎么修复

@pwjbj
Copy link

pwjbj commented Mar 28, 2024

drop_console 不想注释 怎么才能忽略ezuikit.js,

@pwjbj
Copy link

pwjbj commented Mar 28, 2024

先把这个 drop_console 注释试一下 或者忽略 ezuikit.js, 这是第三方的库一个问题。 后面看一下怎么修复

drop_console 不想注释 怎么才能忽略ezuikit.js,

@freeshineit
Copy link
Collaborator

drop_console

配置 reserved https://terser.org/docs/options/#compress-options

@pwjbj
Copy link

pwjbj commented Mar 29, 2024

drop_console

配置 reserved https://terser.org/docs/options/#compress-optio
不好使呀,麻烦能给个例子么
terserOptions: {
compress: {
drop_debugger: env.VITE_DROP_DEBUGGER === 'true',
drop_console: env.VITE_DROP_CONSOLE === 'true'
},
mangle: {
reserved: ['ezuikit.js']
}
}

@Sunrisies
Copy link

drop_console

配置 reserved https://terser.org/docs/options/#compress-optio配置 gereserveer https://terser.org/docs/options/#compress-optio
不好使呀,麻烦能给个例子么  Dit is nie goed nie, kan jy 'n voorbeeld gee?
terserOptions: {
compress: {  Kompressie: {
drop_debugger: env.VITE_DROP_DEBUGGER === 'true', Trap_Debucker: Env. Wide_Drop_Debucker=== 'Geteken',
drop_console: env.VITE_DROP_CONSOLE === 'true' Trap_console: Env. Wide_drop_console=== 'Waar'
},
mangle: {  ontbreek: {
reserved: ['ezuikit.js'] voorbehou: ['ezuikit.js']
}
}

image

@freeshineit
Copy link
Collaborator

试了很多方法还是不行。 这是一个三方的对讲相关(Janus)的库。 在 terser (https://try.terser.org/) 也试了
image, 不知道是不是 terser 的bug

后面我们会替换掉这个三方库内部的打印日志, 设置成可配的

@freeshineit
Copy link
Collaborator

terser bug
terser/terser#1515

@freeshineit freeshineit added the bug Something isn't working label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@freeshineit @Ezviz-Open @pwjbj @onlyleeq @Sunrisies and others