Import { initialize } from '@ionic/core/components'; gives node error - unexxpected token export


I am trying to integrate Ionic in SvelteKit (as part of upgrading from Svelte) and I am stuck at the necessary import of the core function initialize. I am getting error:

(node:12068) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
Unexpected token 'export'
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';

type:module is set in package.json, so this is not helping.

I am using node 18.10.0.

Anyone have a clue?