Closed ColinTravis closed 7 months ago
is it netlify edge ? if no, can you please share a snippet from your email tempalte, just the script tag content if you can
It is netlify edge, and it seems to also be the same issue as #35. Switching to pnpm
from bun has fixed it for the time being. For kicks, here's the template (with some images/copy obfuscated):
<script lang="ts" setup>
const main = {
backgroundColor: '#fff',
fontFamily: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif',
}
const paragraph = {
padding: '0 20px',
fontSize: '18px',
color: '#ffffff',
fontFamily: '"Helvetica Neue", Arial, sans-serif',
}
const container = {
width: '600px',
}
const containerButton = {
display: 'flex',
justifyContent: 'center',
width: '100%',
}
const button = {
margin: '0 auto',
backgroundColor: '#FFC422',
padding: '15px 30px',
borderRadius: '999px',
color: '#003C71',
fontSize: '16px',
textTransform: 'uppercase',
fontWeight: 'bold',
cursor: 'pointer',
fontFamily: '"Helvetica Neue", Arial, sans-serif',
}
const content = {
backgroundColor: '#003C71',
overflow: 'hidden',
}
const boxInfos = {
padding: '20px 40px',
}
const sectionFooter = {
margin: '0 auto',
backgroundColor: '#0093DA',
padding: '5px 0 27px 0',
textAlign: 'center',
}
</script>
<template>
<EHtml>
<EHead />
<EPreview>Header</EPreview>
<EBody :style="main">
<EContainer width="600" :style="container">
<ESection :style="content">
<ERow>
<EColumn align="center">
<EImg style="width:100%" width="600"
src="<HEADERIMAGE>" />
</EColumn>
</ERow>
<ERow :style="{
...boxInfos,
paddingBottom: 0,
}">
<EColumn align="center">
<EImg width="380" alt=""
src="<HEADERLOGO>" />
<EText
style="margin-top: 36px; margin-bottom: 25px; padding-left: 10px; padding-right: 10px; text-align: center; "
:style="paragraph">BODY</EText>
</EColumn>
</ERow>
<ERow>
<EColumn align="center" :style="containerButton" col-span="{2}">
<EButton px="20" py="12" :style="button"
href="#">BUTTON</EButton>
</EColumn>
</ERow>
<ERow>
<EColumn align="center">
<EImg width="600"
src="<FOOTERIMAGE>" />
</EColumn>
</ERow>
</ESection>
<ESection :style="sectionFooter">
<ERow>
<EColumn align="right" style="width: 33.333%; padding-right: 8px">
<ELink href="#">
<EImg width="32" alt="Facebook Icon"
src="<ICONIMAGE>" />
</ELink>
</EColumn>
<EColumn align="center" style="width: 33.333%; padding-left: 8px">
<ELink href="#">
<EImg width="32" alt="Instagram Icon"
src="<ICONIMAGE>" />
</ELink>
</EColumn>
<EColumn align="left" style="width: 33.333%; padding-left: 8px">
<ELink href="#">
<EImg width="32" alt="TikTok Icon"
src="<ICONIMAGE>" />
</ELink>
</EColumn>
</ERow>
</ESection>
</EContainer>
</EBody>
</EHtml>
</template>
okay thank you, glad it worked
Running a simple email compilation, using this exact example code:
I have my
SuccessEmail.vue
located in~/emails
Currently this all works on dev. However, when deploying to netlify, when the server function runs I'm returned with this error server-side:
I'm not certain the esbuild error effects this, but I'm not certain why my SuccessEmail component isn't being found.
I can see it in my deployed files:
Here's my nuxt.config file: