-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Description
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
I am on astro@0.20.3
Using the markdown component works when used like this:
<Markdown>
# Foo
</Markdown>But it causes a parse error when used like in this .astro file:
---
import { Markdown } from 'astro/components';
const content = "# Foo";
---
<Markdown content={content} />Error message:
[23:50:59] [snowpack] Build Result Error: There was a problem with a file build result.
[executing astro] Error: Parse error @:1:1
at parse (/client/node_modules/snowpack/node_modules/es-module-lexer/dist/lexer.cjs:1:402)
at scanCodeImportsExports (/client/node_modules/snowpack/lib/cjs/rewrite-imports.js:21:29)
at transformEsmImports (/client/node_modules/snowpack/lib/cjs/rewrite-imports.js:37:27)
at Object.transformFileImports (/client/node_modules/snowpack/lib/cjs/rewrite-imports.js:108:16)
at FileBuilder.resolveImports (/client/node_modules/snowpack/lib/cjs/build/file-builder.js:116:48)
at async Object.loadUrl (/client/node_modules/snowpack/lib/cjs/commands/dev.js:641:39)
at async load (/client/node_modules/snowpack/lib/cjs/commands/dev.js:217:28)
at async /client/node_modules/snowpack/lib/cjs/ssr-loader/index.js:60:28
at async Object.importModule (/client/node_modules/snowpack/lib/cjs/ssr-loader/index.js:165:26)
at async load (file:///path/to/client/node_modules/astro/dist/runtime.js:93:17)
at async Server.<anonymous> (file:///path/to/client/node_modules/astro/dist/dev.js:21:20) {
idx: 0
}
Steps to Reproduce
- Use basic astro template
- Create .astro file in
/src/pagesas described in this report - Try to open the page
Link to Minimal Reproducible Example (Optional)
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels