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
使用 lodash-cli lodash template 生成的js 文件 因为使用了 with 语句,会在严格模式下报错
可以使用 Function 来执行代码 就可以避免这个问题了
const templates = Function('return' + code /* 生成的代码 */)() // 压缩版的js 可能需要 手动删除开头的;
参考 app.js
build 参数
lodash exports="none" \ iife="(function(){%output%;return templates})()" \ template=*.jst \ -o complied.js
参考 build-template.sh
The text was updated successfully, but these errors were encountered:
No branches or pull requests
使用 lodash-cli
lodash template 生成的js 文件 因为使用了 with 语句,会在严格模式下报错
可以使用 Function 来执行代码 就可以避免这个问题了
参考 app.js
build 参数
参考 build-template.sh
The text was updated successfully, but these errors were encountered: