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

Can't raw-import markdown with process.env.NODE_ENV in code fence. #12258

Closed
7 tasks done
janosh opened this issue Mar 2, 2023 · 2 comments
Closed
7 tasks done

Can't raw-import markdown with process.env.NODE_ENV in code fence. #12258

janosh opened this issue Mar 2, 2023 · 2 comments

Comments

@janosh
Copy link

janosh commented Mar 2, 2023

Describe the bug

import readme from './readme.md?raw';

crashes if readme.md contains

if (process.env.NODE_ENV === `production`) {
  // prod
}

Removing process.env.NODE_ENV or changing a single letter does not trigger.

Reproduction

https://stackblitz.com/edit/vitejs-vite-ddg5ia?file=main.js,readme.md&terminal=dev

Steps to reproduce

No response

System Info

Stackblitz

Used Package Manager

npm

Logs

No response

Validations

@stackblitz
Copy link

stackblitz bot commented Mar 2, 2023

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@bluwy
Copy link
Member

bluwy commented Mar 2, 2023

Duplicate of #9829

@bluwy bluwy marked this as a duplicate of #9829 Mar 2, 2023
@bluwy bluwy closed this as not planned Won't fix, can't repro, duplicate, stale Mar 2, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants