我希望有一些webpack选项(或加载程序),例如bare
coffee
,它删除了顶层函数包装器并公开了变量,以方便调试。
script-loader evaluates the required module in the global context. Essentially it generates eval(source)
in the global context in the output bundled javascript file. Beware to avoid setting use strict
otherwise the eval would create its own scope (instead of using the global context).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.