es-analysis / plato

JavaScript source code visualization, static analysis, and complexity tool
MIT License
4.56k stars 321 forks source link

dynamic import causes SyntaxError: Unexpected token (37:30) #214

Closed mauricionr closed 3 years ago

mauricionr commented 6 years ago

I'm using Vue 2.x.x with webpack 4.x.x and also dynamic import

here's the snippet in the line 37:30

export default new Vue({
...
components: {
    'simple-promotion': () => import(//37:30
      /* webpackChunkName: "simple-promotion" */
      '../../components/simplePromotion.vue'
    ),
 }
...
})
typhonrt commented 5 years ago

Hi @mauricionr I'm the author of the underlying complexity reporting module, typhonjs-escomplex that Plato uses. I just have published a new version which has switched to Babel parser and have verified that a whole lot of edge JS and proposals are supported including the above.

I'll be submitting a PR to Plato after I have integrated the new version in the next day or so.

Even cooler is that Typescript will work now too! 🎉