title: Import statement breaks typeorm enitities when registered through config.json file
body: <p>Following official docs, I created small koa/typeorm/postgres app. When I was using <code>createConnection</code> with config, importing entities in the same file, app was working fine, but typeorm cli coudn't find config file so I tried moving config to "ormconfig.json". Now I get this error:</p>
  
  <p><code>SyntaxError: Cannot use import statement outside a module</code></p>
  
  <p>It looks as if typeorm isn't able to use es6 features.</p>
  
  <p>My <code>ormconfig.json</code>:</p>
  
  <pre><code>{
    "type": "postgres",
    "host": "localhost",
    "port": 5432,
    "username": ****,
    "password": ****,
    "database": ****,
    "synchronize": true,
    "entities": ["src/entity/**/*.ts"],
    "migrations": ["src/migration/**/*.ts"],
    "subscribers": ["src/subscriber/**/*.ts"],
    "cli": {
      "entitiesDir": "src/entity",
      "migrationsDir": "src/migration",
      "subscribersDir": "src/subscriber"
    }
  }
  </code></pre>
  
  <p>My <code>tsconfig.json</code>:</p>
  
  <pre><code>{
    "compilerOptions": {
      "lib": ["es5", "es6"],
      "target": "es6",
      "module": "commonjs",
      "moduleResolution": "node",
      "outDir": "./dist",
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
    },
    "exclude": ["node_modules"]
  }
  </code></pre>
  
  <p>File with error:</p>
  
  <pre><code>import {
    BaseEntity,
    Column,
    Entity,
    PrimaryGeneratedColumn,
    CreateDateColumn,
    ManyToOne
  } from 'typeorm';
  import { IsIn, IsPositive, IsNotEmpty } from 'class-validator';
  
  import { LOAN_TYPE } from '../consts';
  import { User } from './user';
  
  @Entity('loans')
  export class Loan extends BaseEntity {
    @PrimaryGeneratedColumn()
    public id: number;
  
    @CreateDateColumn({ type: 'timestamp' })
    public createdAt: Date;
  
    @Column()
    @IsNotEmpty()
    @IsPositive()
    public amount: number;
  
    @Column({ type: 'enum', enum: LOAN_TYPE })
    @IsNotEmpty()
    @IsIn(Object.values(LOAN_TYPE))
    public type: LOAN_TYPE;
  
    @Column({ default: false })
    public approvalStatus: boolean;
  
    @ManyToOne(type =&gt; User, user =&gt; user.loans)
    @IsNotEmpty()
    public user: User;
  }
  
  export default Loan;
  
  </code></pre>