Describe the bug
Filenames with dashes make the templater produce invalid code for moduleManifest.ts
✘ [ERROR] Expected "from" but found "-"
.mailing/src/moduleManifest.ts:9:12:
9 │ import reset-password from "../../emails/reset-password";
│ ^
╵ from
wait - compiling...
error - unhandledRejection: Error: Build failed with 1 error:
.mailing/src/moduleManifest.ts:9:12: ERROR: Expected "from" but found "-"
at failureErrorWithLog (/home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:1575:15)
at /home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:1033:28
at /home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:978:67
at buildResponseToResult (/home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:1031:7)
at /home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:1143:14
at responseCallbacks.<computed> (/home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:680:9)
at handleIncomingPacket (/home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:735:9)
at Socket.readFromStdout (/home/mokhtar/app/remixtape/node_modules/mailing/node_modules/esbuild/lib/main.js:656:7)
at Socket.emit (node:events:513:28)
at addChunk (node:internal/streams/readable:324:12)
at readableAddChunk (node:internal/streams/readable:297:9)
at Readable.push (node:internal/streams/readable:234:10)
at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) {
errors: [
{
detail: undefined,
id: '',
location: [Object],
notes: [],
pluginName: '',
text: 'Expected "from" but found "-"'
}
],
warnings: []
}
To Reproduce
Steps to reproduce the behavior:
Create an email with a dash in the filename i.e. reset-password.tsx
Run npx mailing preview
See error in the logs
Expected behavior
I would expect my email templates to get picked up and work even if their file names contain dashes
Desktop (please complete the following information):
Describe the bug Filenames with dashes make the templater produce invalid code for
moduleManifest.ts
To Reproduce Steps to reproduce the behavior:
reset-password.tsx
npx mailing preview
Expected behavior I would expect my email templates to get picked up and work even if their file names contain dashes
Desktop (please complete the following information):