Skip to content

Instantly share code, notes, and snippets.

@gkatsev
Last active November 8, 2018 03:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gkatsev/d60b19120db3ada5d21a00ba5996f109 to your computer and use it in GitHub Desktop.
Save gkatsev/d60b19120db3ada5d21a00ba5996f109 to your computer and use it in GitHub Desktop.
when running babel on `bar.js`, the output method `_interopRequireDefault` will have the return object with property `default` be unquoted. Commenting out line 6, will make `default` be quoted properly.
{
"presets": [ "es3", ["es2015", {"loose": true}] ]
}
import Foo from './foo';
class Bar {};
// commenting out this file causes the `interopRequireDefault` method to have an unquoted `default` property name
typeof "foo";
export default class Foo {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment