mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
coffeescript: improve es6 regex performance (#7846)
This commit is contained in:
committed by
Ben Newman
parent
697e7ae0f7
commit
c13fe33aa3
@@ -83,7 +83,7 @@ export class CoffeeCompiler extends CachingCompiler {
|
||||
|
||||
let sourceMap = JSON.parse(output.v3SourceMap);
|
||||
|
||||
if (source.match(/`|\b(?:import|export|yield)\b/)) {
|
||||
if (/`|\b(?:import|export|yield)\b/.test(source)) {
|
||||
// If source contains backticks or features that output as ES2015+,
|
||||
// pass the coffee output through babel-compiler
|
||||
const doubleRoastedCoffee =
|
||||
|
||||
Reference in New Issue
Block a user