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

Requiring "commonmark/dist/commonmark" breaks bundling processes #11

Closed
petetnt opened this issue Jan 7, 2016 · 5 comments
Closed

Requiring "commonmark/dist/commonmark" breaks bundling processes #11

petetnt opened this issue Jan 7, 2016 · 5 comments

Comments

@petetnt
Copy link

petetnt commented Jan 7, 2016

In 62df2b2 the Parser require was changed to:

``` diff`

  • var Parser = require('commonmark/dist/commonmark').Parser;

This fails at least on Node v4-5, npm@3 and `Browserify` with error

Error: Cannot find module './common' from 'D:\Projects\crf\node_modules\react-markdown\node_modules\commonmark\dist'


There's also an comment from @just-paja in the commit with same happening with `Webpack`

> I like your project, but this breaks webpack for me with a This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results error.
@rexxars
Copy link
Collaborator

rexxars commented Jan 7, 2016

Alright, let me revert this change and release a new version later today. It'll require webpack users to include a JSON-loader, but I feel like this is probably a better option than requiring the dist version here.

@petetnt
Copy link
Author

petetnt commented Jan 7, 2016

👍

1 similar comment
@just-paja
Copy link

👍

@rexxars
Copy link
Collaborator

rexxars commented Jan 8, 2016

Fixed in new release. Sorry for the wait.

@rexxars rexxars closed this as completed Jan 8, 2016
@petetnt
Copy link
Author

petetnt commented Jan 8, 2016

Thanks 👍

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

No branches or pull requests

3 participants