Support for "import" inside of tag #69

Closed
kuashe opened this Issue May 30, 2016 · 1 comment

Projects

None yet

2 participants

@kuashe
Contributor
kuashe commented May 30, 2016 edited

ES 2015 "import" is not usable at the moment with riot .

Taken from this issue

<tag>
   <script>
     import baz from './baz'
     this.foo = 'bar'
   </script>
</tag>
riot.tag2('tag','', function(opts) {
   import baz from './baz' // import here is not allowed
   this.foo = 'bar'
})

I think the compiler needs to translate the import statement into a regular "import" .

import baz from './baz' // Will work this way
riot.tag2('tag','', function(opts) {
   this.foo = 'bar'
})

I will try to make thoses changes to the compiler .

@GianlucaGuarini GianlucaGuarini referenced this issue in riot/riot Jun 4, 2016
Closed

Riot 3.0.0 roadmap #1694

14 of 16 tasks complete
@GianlucaGuarini
Member

fixed in riot-compiler@2.5.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment