browserify / browserify/browserify

Add support for ES6 import syntax

Open
#1,186 59 comments 59 reactions 0 assignees View on GitHub
feature-request
Dominant language
JavaScript
Stars
14.7k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

This might be a long shot but I'd like to see this in browserify.

The ES6 module syntax has a few nice features compared to commonJS `require` method,
namely [bindings](https://github.com/esperantojs/esperanto/wiki/Bindings) and [cyclic dependencies](https://github.com/esperantojs/esperanto/wiki/Cycles).

Since these things are in the ES6 standard it seems reasonable to work them into browserify too!

Note that just using a ES6 to ES5 transpiler wouldn't work in this case because these are cross module concerns.
For instance, `babelify` is only able to transpile `import foo from 'foo'` to `var foo = require('foo')` at file-level, but this does not allow cyclic dependencies.

The [Esperanto](https://github.com/esperantojs/esperanto) project has a nice way of handling things but lacks too many features to be a valid replacement for browserify.

Is there any possibility to see support for ES6 `import` syntax come to browserify?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.