Skip to content

import ES6 modules into Haxe generated JavaScript

License

Notifications You must be signed in to change notification settings

haxiomic/jsImport

 
 

Repository files navigation

jsImport - use ES6 imports in Haxe

With -lib jsImport you can decorate any extern class with @:js.import like so:

  • @:js.import(@star './some/path.js') extern class Foo {} becomes import * as Foo from './some/path.js'
  • @:js.import(@default './some/path.js') extern class Foo {} becomes import Foo from './some/path.js'
  • @:js.import('./some/path.js') extern class Foo {} becomes import { Foo } from './some/path.js'
  • @:js.import('./some/path.js', 'SomeName') extern class Foo {} becomes import { SomeName } from './some/path.js'

About

import ES6 modules into Haxe generated JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Haxe 100.0%