Closed benmccann closed 4 years ago
This won't work because Sapper's generated files use CommonJS:
(node:78315) ExperimentalWarning: The ESM module loader is experimental.
file:///.../sapper-firebase-typescript-graphql-tailwindcss-actions-template/__sapper__/dev/server/server.js:3
Object.defineProperty(exports, '__esModule', { value: true });
^
ReferenceError: exports is not defined
at file:///.../sapper-firebase-typescript-graphql-tailwindcss-actions-template/__sapper__/dev/server/server.js:3:23
at ModuleJob.run (internal/modules/esm/module_job.js:110:37)
at async Loader.import (internal/modules/esm/loader.js:164:24)
> Server crashed
Thanks for testing! I had a patched version of Sapper that fixed that, but thought it worked either way. I guess I'll have to get my patch into Sapper first
This will enforce that ES6 syntax is used and that no
require
statements sneak back in