systemjs / plugin-babel

SystemJS Babel Plugin
MIT License
82 stars 33 forks source link

toConsumableArray 404 #82

Closed aendra-rininsland closed 7 years ago

aendra-rininsland commented 7 years ago

I use plugin-babel in ft-interactive/d3-bootloader and it works fantastic, but whenever I try to splat an object into an array (i.e., [...objectConst]), I get the following error:

toConsumableArray 404

Any idea why?

guybedford commented 7 years ago

babel-helpers expects to be loaded relative to the path to the babel plugin itself.

This may have something to do with your unpkg config, try configuring it something like:

{
  map: {
    'plugin-babel': 'https://unpkg.com/systemjs-plugin-babel@0.0.25'
  },
  packages: {
    'plugin-babel': {
      main: 'plugin-babel.js'
    }
  }
}
aendra-rininsland commented 7 years ago

Hi @guybedford, thanks for the response. Adding that packages stanza to my config totally fixed it! Many thanks! 🙌