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

import is not working correctly in mdx #16799

Closed
csr632 opened this issue Aug 20, 2019 · 1 comment
Closed

import is not working correctly in mdx #16799

csr632 opened this issue Aug 20, 2019 · 1 comment

Comments

@csr632
Copy link
Contributor

csr632 commented Aug 20, 2019

Description

When rendering with MDXRenderer, import in different .mdx with same identifer name will conflict.

I think this bug is caused by this line:

Object.assign({}, ${files.map((_, i) => `scope_` + i).join(`,\n`)} )

For example, scope_ 0 and scope_ 1 may have same property!

Steps to reproduce

I reproduce this bug with "Gatsby Default Starter"
https://github.com/csr632/reproduce-gatsby-mdx-issue

Expected result

import in different .mdx should not interfere each other.

Actual result

They do.

Environment

all

@ChristopherBiscardi
Copy link
Contributor

closing in favor of #17119. Thanks for the report!

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