Skip to content

Commit

Permalink
Make isESModule more restrictive
Browse files Browse the repository at this point in the history
  • Loading branch information
CompuIves committed Jun 2, 2020
1 parent 7a0ee10 commit f8b4c6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/app/src/sandbox/eval/utils/is-es-module.ts
@@ -1,4 +1,4 @@
const expr = /(^|[^\w\s."])(import|export)([^\w])/gm;
const expr = /(;|^|})(import|export)(\s|{)/gm;

export default function isESModule(code: string) {
expr.lastIndex = 0;
Expand Down

0 comments on commit f8b4c6e

Please sign in to comment.