Skip to content
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

It does not resolve import/export #24

Open
uaNikita opened this issue Apr 5, 2017 · 1 comment
Open

It does not resolve import/export #24

uaNikita opened this issue Apr 5, 2017 · 1 comment

Comments

@uaNikita
Copy link

uaNikita commented Apr 5, 2017

Hi, thanks for you example.

I have a question. When I added my additional module via

import test from './test.jsx';

with content

export default 1;

babel compile it to

var _test = require('./test');

var _test2 = _interopRequireDefault(_test);

and it does not work because node does not understand export default 1;.

Babel somehow resolve dependencies for production? Or I should use webpack for example?

@santimendoza
Copy link

See: https://babeljs.io/docs/usage/cli/

ES6-style module-loading may not function as expected
Due to technical limitations ES6-style module-loading is not fully supported in a babel-node REPL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants