Skip to content

Use more idiomatic ES6 import/export syntax? #273

Closed
@eventualbuddha

Description

@eventualbuddha

Currently all imports exist solely, as far as I can tell, to configure the order in which the files are concatenated (via smash). In a real ES6 environment instead of this

import "iterable"
class Collection extends Iterable {}

you'd do something like this

import { Iterable } from "./iterable";
class Collection extends Iterable {}

Ideally you'd then combine the files using a smarter version of smash, i.e. the (shameless plug) es6-module-transpiler's bundle format.

I'm working on extracting the bundler from es6-module-transpiler into its own project, and I tried using immutable-js as a test project. I've converted some of the files to the style above and the output is essentially the same as when used with smash.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions