0

I am trying to export and import objects in the browser using ES6 modules.

I have tried

import { options } from 'options';

but I get the error Uncaught SyntaxError: Unexpected token import.

Then I tried transpiling it, but now I receive the error Uncaught ReferenceError: require is not defined.

Is it not possible to use modules in the browser?

4

1 Answer 1

0

You might want to look into http://jspm.io/ it's based on system.js.

Hope that helps..

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.