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

How about add ES Modules support? #46

Closed
Jack-Kingdom opened this issue Jun 26, 2018 · 2 comments
Closed

How about add ES Modules support? #46

Jack-Kingdom opened this issue Jun 26, 2018 · 2 comments

Comments

@Jack-Kingdom
Copy link

Jack-Kingdom commented Jun 26, 2018

Build failed when integrated with React:

Creating an optimized production build...
Failed to compile.

Failed to minify the code from this file:

 	./node_modules/markdown-it-anchor/index.js:1

Read more here: http://bit.ly/2tRViJ9
@srallen
Copy link

srallen commented Jun 27, 2018

The issue is with the spread on this line:

state.tokens[idx + 1].children[position[opts.permalinkBefore]](...linkTokens)

This feature is supported in Node 10, but version 10 isn't LTS yet, so I don't think it's reasonable to expect people to be upgraded yet. It's also not fully supported in IE or Edge. ETA: sorry, the syntax looks really similar between rest and spread. This is a rest parameter, so should be supported in node, but it isn't supported in IE. So I'm not sure if this is the issue with the compiling, however, to work around you must include this package in your babel compiling using webpack, browserify, etc.

@nagaozen
Copy link
Collaborator

Branch 2019-stack should fix this.

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