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

import declarations may only appear at top level of a module #15

Closed
carmenbranje opened this issue May 26, 2017 · 2 comments
Closed

import declarations may only appear at top level of a module #15

carmenbranje opened this issue May 26, 2017 · 2 comments

Comments

@carmenbranje
Copy link

I included d3-textwrap.js in my index file but I get the following error:

line 1 - import declarations may only appear at top level of a module

@woodz-
Copy link

woodz- commented Sep 13, 2017

Might be helpful to document a bit deeper and separate user groups:

  • npm users: do this
  • browser users: do that

For me it's not clear on how to use it in browser. Which file to include in <script> tags? Will I need to browserify first? Then which file to start over? etc.

Had a couple of error prone tries with browserify:

export {selection, select} from 'd3-selection';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

@vijithassar
Copy link
Owner

I've added this to the documentation.

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

3 participants