You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__static是electron-vue提供的一个变量,electron原生是没有的。
对应的是当前项目目录的static文件夹。
在开发环境下测试时,__static这个变量是由webpack来进行处理的,实际上就是当前开发项目的根目录下的static文件夹。而在生产环境中,__static变量被保存到nodejs提供的global对象里去,需要保证的是,得等到他已经确认挂载到了global对象上再去引用。
BUG: 打包后打开可执行文件,发现报错: __static is not defined
而在开发环境下是没有问题的。因为开发环境下的__static变量并没有挂载到global对象上。
修改代码引用顺序就可以了。
The text was updated successfully, but these errors were encountered:
__static是electron-vue提供的一个变量,electron原生是没有的。
对应的是当前项目目录的static文件夹。
在开发环境下测试时,__static这个变量是由webpack来进行处理的,实际上就是当前开发项目的根目录下的static文件夹。而在生产环境中,__static变量被保存到nodejs提供的
global
对象里去,需要保证的是,得等到他已经确认挂载到了global对象上再去引用。BUG: 打包后打开可执行文件,发现报错:
__static is not defined
而在开发环境下是没有问题的。因为开发环境下的__static变量并没有挂载到
global
对象上。修改代码引用顺序就可以了。
The text was updated successfully, but these errors were encountered: