mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Co-authored-by: Nate Moore <nate@astro.build>
This commit is contained in:
parent
b0033cef32
commit
c0992e1fef
2 changed files with 9 additions and 1 deletions
5
.changeset/heavy-nails-juggle.md
Normal file
5
.changeset/heavy-nails-juggle.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
'astro': patch
|
||||
---
|
||||
|
||||
Fix bug where Astro's server runtime would end up in the browser
|
|
@ -56,7 +56,10 @@ async function transformJSX({
|
|||
}: TransformJSXOptions): Promise<TransformResult> {
|
||||
const { jsxTransformOptions } = renderer;
|
||||
const options = await jsxTransformOptions!({ mode, ssr });
|
||||
const plugins = [...(options.plugins || []), tagExportsPlugin({ rendererName: renderer.name })];
|
||||
const plugins = [...(options.plugins || [])];
|
||||
if (ssr) {
|
||||
plugins.push(tagExportsPlugin({ rendererName: renderer.name }))
|
||||
}
|
||||
const result = await babel.transformAsync(code, {
|
||||
presets: options.presets,
|
||||
plugins,
|
||||
|
|
Loading…
Reference in a new issue