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.

export default Layout; (with semicolon)

See original GitHub issue

Hi, I noticed that the mdx examples don’t use semicolons, are they valid?

Because export default Layout; is failing:

mdx.sync(`
import Layout from './Layout';

export default Layout;

# Hello, world!
`)

returns:

import Layout from './Layout';

export default ({components, ...props}) => <MDXTag name="wrapper" Layout={Layout;} layoutProps={props} components={components}>

<MDXTag name="h1" components={components}>{`Hello, world!`}</MDXTag></MDXTag>

(see Layout={Layout;})

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
silvenoncommented, Oct 30, 2018

Released in v0.15.6! It turned out to be an easy fix.

2reactions
timneutkenscommented, Sep 27, 2018

In feel like it should be supported 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

Semicolon after default export - javascript
UPDATE: If I leave the semicolon: export default function() {} (() => { // creating a new function scope })(); then the exported...
Read more >
Code in Vue.js project templates missing semicolons
The code that is created as part of templates for the File | New Project menu option for Vue.js is missing several semicolons....
Read more >
JavaScript: Semicolon Rules
Disadvantage of Omitting Semicolon. Code becomes layout dependent. If you join 2 lines into 1 line, the code won't run correctly.
Read more >
How to open CSV files with the correct delimiter/separator
Depending on your Excel's regional setting, your default delimiter/separator may either be using semicolons (;) or commas (,) to separate items in a...
Read more >
Export data to a text file
By default, fields that support multiple values are exported as a list of values separated by semicolons (;) and enclosed in double quotation...
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