Hi, I’m interested in using Ionic 4 web components in a svelte application, treating Ionic as a javascript library (as opposed to Angular/React/etc). Svelte is a new-ish framework that compiles down to pure-javascript.
I have a repo here: https://github.com/tnishimura/ionic-svelte-demo
When I load the js and CSS from a CDN as describe in the doc at , everything works well:
<script type="module" src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.esm.js"></script>
<script nomodule src="https://cdn.jsdelivr.net/npm/@ionic/core/dist/ionic/ionic.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ionic/core/css/ionic.bundle.css"/>
However, I’d like to bundle all javascript and css with rollup. So far, all my attempts have failed, not sure if it’s because of Svelte or because I’m doing something dumb. I’ve tried variety of things like:
import '@ionic/core';
import '@ionic/core/dist/ionic/ionic.esm.js';
import Ionic from '@ionic/core'
import '../node_modules/@ionic/core/dist/ionic/ionic.js';
and in no case does it allow me to use <ion-*> web components. Any help?