-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error combining with 6to5ify #39
Comments
Ack! The same problem with [email protected] and [email protected] on [email protected] for Linux. |
But it works perfectly fine when used like
I don't have to disable 6to5. |
Faced this problem as well. |
I'm guessing this is down to how Babel (was: 6to5) transpiles ES6 imports. This: import fs from 'fs' Becomes this: var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var fs = _interopRequire(require("fs")); If you want to go this route, resorting to a regular var fs = require('fs'); |
Just hit that, too. |
agh |
👍 |
I think this could be handled upstream in static-module adding support for ES6 imports (not as much of a problem adding them here than to browserify itself since the node semantics haven't been hammered out). But then brfs should come before 6to5ify/babelify in the transform list. |
looks like static-module has been updated with ES6 support ? browserify/static-module@2eb7ce0 |
I'm using brfs 1.4.1 which pulls in static-module 1.1.3 and still can't get brfs to work happily with ES6/babelify. Using same workaround as others for the moment, |
@jedrichards after some time using
|
Tou say "import is intended for real modules which use export for exporting things. And fs is not one of these yet." Over the last few days, I have created and imported modules that use both the Mixed_Imports.zip contains |
I'm trying to do a brfs transform after 6to5ify, but get the following error.
btw, there's a double "while parsing file" in the message.
My main.js looks like this.
If I change the import to a require and don't do 6to5ify it works fine, but together it gives the error.
The text was updated successfully, but these errors were encountered: