Skip to content

Build error when using JS imports: Browser scripts cannot have imports or exports #6490

Answered by devongovett
moritzlaube asked this question in Q&A
Discussion options

You must be logged in to vote

You need to add type="module" to your script tag. There should be an error message describing this but codeframes might be broke at the moment (see #6485).

Replies: 8 comments 21 replies

Comment options

You must be logged in to vote
9 replies
@DeMoorJasper
Comment options

@devongovett
Comment options

@Himavanth
Comment options

@sfrieson
Comment options

@mathcodes
Comment options

Answer selected by moritzlaube
Comment options

You must be logged in to vote
4 replies
@mischnic
Comment options

@jessabyrne
Comment options

@mischnic
Comment options

@wll8
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@403-html
Comment options

Comment options

You must be logged in to vote
3 replies
@mischnic
Comment options

@403-html
Comment options

@7Creed
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@jcucuzza
Comment options

@dioptre
Comment options

@dioptre
Comment options

@LeoDog896
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet