Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix ES6 default export#40

Open
webfrank wants to merge 1 commit into
caldwell:master from
bizmate-oss:master
Open

Fix ES6 default export #40
webfrank wants to merge 1 commit into
caldwell:master from
bizmate-oss:master

Conversation

@webfrank

@webfrank webfrank commented Mar 10, 2021

Copy link
Copy Markdown

Added ES6 export, can be used like:

import renderjson from 'renderjson

rtritto reacted with thumbs up emoji

Copy link
Copy Markdown

Does that break ES5 support?

rtritto commented Sep 28, 2022

Copy link
Copy Markdown

Any update?

rtritto commented Feb 24, 2023

Copy link
Copy Markdown

@caldwell please can you merge this?

Copy link
Copy Markdown
Owner

Not as it stands, no. When try it on the test.html page I get this error:

Uncaught SyntaxError: export declarations may only appear at top level of a module

I'm not opposed to Ecmascript modules at all, but right this second I don't know how to make something compatible with commonjs and modules and just raw <script> sourcing in html.

Probably the right answer in 2023 is to just make it a module, and use esbuild or something to make the non-module version/minimized versions when prepping for npm publish...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /