Open tobiasmuehl opened 4 years ago
It could be the same issue as this: https://github.com/sveltejs/svelte/issues/5185
Likely also related to #7 but none of the suggestions in that issue helped
Here's a possible solution @tobiasmuehl https://github.com/sveltejs/svelte/issues/5185#issuecomment-665369367
Hope that works, but not sure how to test it. Do I just apply the changes from https://github.com/mhkeller/lc-ssr-test/pull/1/commits/03c6f2080c6e1b0f2ed24f0882495107a5a79acc as a patch on top of my repo? Will changing the include path to build it break hot reload in development? (https://github.com/mhkeller/lc-ssr-test/pull/1/commits/03c6f2080c6e1b0f2ed24f0882495107a5a79acc#diff-168726dbe96b3ce427e7fedce31bb0bcL2)
I'm not sure how it would apply. i think the pancake site is built with sapper so you could try seeing what that config is like. sorry i can't be more helpful
Could be the alias rollup config https://github.com/Rich-Harris/pancake/blob/feef3af9346e5d7b56b9ef1c3dff2e4ac53f4e20/site/rollup.config.js#L27
I don't think the alias is the issue, but it is aliasing the local files. I think its something with the package.json file (maybe rollup), but I haven't sussed it out.
As a workaround, copy /components
, /helpers
, /utils
, and index.mjs
to your components dir (e.g. /src/components/pancake
) and use a relative path (e.g. import * as Pancake from './pancake';
). Additionally, I can't get the alias to work without the same error.
Can't get it to work with Sapper. The rollup-compiled
server.js
containsvar pancake = require('@sveltejs/pancake');
which will break as the package doesn't have amain
attribute in thepackage.json
.Looking at the rollup plugin config options, it sounds like rollup should be able to take care of it, but I can't work out which options to set
Adding a
main
attribute changes the error to this: