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

无法使用代码保护功能 #77

Open
surethink opened this issue May 26, 2019 · 3 comments
Open

无法使用代码保护功能 #77

surethink opened this issue May 26, 2019 · 3 comments

Comments

@surethink
Copy link

小程序编辑器选择真机调试编译代码时,弹出提示:无法使用代码保护功能 。取消编辑器的代码保护功能后可以正常真机调试,如果可能的还是希望能做下兼容,以正常使用代码保护功能

谢谢!

报错如下:
无法使用代码保护功能
in components/wemark/remarkable.js
require is not being used properly in 'UnaryExpression'
1 | /*! remarkable 1.6.0 https://github.com/jonschlinkert/remarkable @license MIT */

2 | !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Remarkable=e()}}(function(){var e;return function t(e,r,n){function s(i,l){if(!r[i]){if(!e[i]){var a="function"==typeof require&&require;if(!l&&a)return

@TooBug
Copy link
Owner

TooBug commented May 26, 2019

代码保护功能和代码压缩是一回事吗?可以尝试更新一下remarkable.js试试看会不会好?

@TooBug TooBug reopened this May 26, 2019
@L-M-Sherlock
Copy link

同样遇到这个问题,预览的时候报错。
TypeError:requrie(...) is not a constructor
然后我在remarkable.js中加入了console.log('1'),发现只有开发者工具中会有1输出,预览的调试里面没有。
关掉代码保护后就正常了。

@Erimus-Koo
Copy link

同遇到该问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants