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

marked.Renderer is not a constructor when using pikapkg/web #100

Open
jarrodek opened this issue Apr 15, 2019 · 2 comments
Open

marked.Renderer is not a constructor when using pikapkg/web #100

jarrodek opened this issue Apr 15, 2019 · 2 comments

Comments

@jarrodek
Copy link

Description

This may be similar to #99. I'm using pikapkg/web (as suggested in Polymer's project issue) to enable native imports which are required for Electron app. After few days I made my project to work but now I see bunch of errors when using marked element. So the Pika web transforms marked library and marked object has only default property and this property has package export.
Now I am not sure how to deal with this issue as Pica does not have "exclude" option to not transform it as ES module. Maybe we could use some type check when constructing the instance of marked renderer?

@stramel
Copy link
Collaborator

stramel commented Apr 15, 2019

@jarrodek You should be able to use the whitelist property on @pikapkg/web to skip the transformation of marked. Check out this comment. FredKSchott/snowpack#40 (comment)

@jarrodek
Copy link
Author

I tried it but no luck. It still gets transformed.
As a walkaround I am calling a script on postinstall script to replace marked.Renderer with marked.default.Renderer and later marked() with marked.default().

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

2 participants