mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:40:00 +08:00
Whitelist specific ES6 features we want for now.
This commit is contained in:
parent
a65e0a80ba
commit
9584990477
|
@ -110,7 +110,7 @@ module Tilt
|
|||
|
||||
def generate_source(scope)
|
||||
js_source = ::JSON.generate(data, quirks_mode: true)
|
||||
js_source = "to5.transform(#{js_source}, {ast: false, blacklist: ['es6.modules', 'useStrict']})['code']"
|
||||
js_source = "to5.transform(#{js_source}, {ast: false, whitelist: ['es6.constants', 'es6.properties.shorthand', 'es6.arrowFunctions', 'es6.blockScoping']})['code']"
|
||||
"new module.exports.Compiler(#{js_source}, '#{module_name(scope.root_path, scope.logical_path)}', #{compiler_options}).#{compiler_method}()"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user