title: Bootstrap.js is not transpiled in time in sailsJS
body: <p>I am writing my backend in sails js using es6/7 and I have defined a class that performs a background task.</p>
  
  <p>Now from <a href="https://stackoverflow.com/questions/22608979/sails-js-background-processing-loop-not-related-to-connections">this</a> StackOverflow post I have learned that background tasks should be initiated at config/bootstrap.js. So I put the following inside that file: </p>
  
  <pre><code>import BackgroundService from '../api/services/backgroundService.js';
  
  module.exports.bootstrap = function(cb) {
    backgroundService= new BackgroundService();
    backgroundService.run();
  
    cb();
  };
  </code></pre>
  
  <p>Now I'm getting typicall transpiler erros like:</p>
  
  <pre><code>  import BackgroundService from '../api/services/backgroundService.js';
    ^^^^^^
  SyntaxError: Unexpected reserved word[...]
  </code></pre>
  
  <p>or, when I replace the import with require:</p>
  
  <pre><code>TypeError: Cannot call a class as a function 
  </code></pre>
  
  <p>(referring to the instantiation of the BackgroundService class)</p>
  
  <p>This indicates that the files are either not transpiled in time or at all.<br>
  I couldn't find a solution to this yet.</p>
  
  <p>Any ideas? </p>