question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: Does markdown-to-jsx/dist/esm.js file have an issue when minified?

See original GitHub issue

Hi I’m using react-styleguidist which uses markdown-to-jsx to render the markdown files. I started getting an error in the console which says: Uncaught ReferenceError: returntrue is not defined on opening the dev tools it looks like there is an issue here: image

Is this an open issue?

Here’s the version: "markdown-to-jsx": { "version": "6.8.1", "resolved": "resolved url", "integrity": "SHA token", "dev": true, "requires": { "prop-types": "^15.6.2", "unquote": "^1.1.0" } },

Thank you in advance for taking the time to look at this. Apologize in advance if I haven’t followed a bug opening template. I’d be more than happy to reopen this in the correct template.

Regards, Nishant

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
probablyupcommented, Oct 23, 2018

Try 6.8.2

2reactions
probablyupcommented, Oct 22, 2018

Ah I see. So in esm.js the relevant code is:

return'production'!==process.env.NODE_ENV

And the bundler is likely replacing process.env.NODE_ENV with 'development'.

And then perhaps the minifier is running a second time and since 'production' !== 'development' is true, it’s replacing it without adding a necessary space back?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Javascript Minification Caching Issue - css - Stack Overflow
This can undoubtedly be a pain. You not only have to version the file but you have to make sure your links are...
Read more >
Should I include copyright in a minified distribution of my js file?
If the file is entirely your own work, without dependencies that aren't public domain, it's technically not required to preserve anything in ...
Read more >
[question] Is it possible to get minification without having to ...
[question] Is it possible to get minification without having to bundle files together? #732. Open. nemesisdesign opened this issue on Nov 2, ...
Read more >
Minify Resources (HTML, CSS, and JavaScript)
Deprecated. This page was written for version 4 of the PageSpeed Insights API, which is deprecated and will be shut down in May...
Read more >
JS Minify/Combine Truncating Long Files - WordPress.org
What causes this issue and how can I fix it without having to switch off ... The question is: Why is a file...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found