You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
add guide on how to install Ionic Core with other frameworks #2105
What is missing or inaccurate about the content on this page?
Ionic Core does work with any library but may lack form/routing integrations. At the very least, we should show how to install @ionic/core, import and use components, and import any required CSS.
This guide should follow the CE build rather than lazy loaded build for optimized tree shaking. We need to cover the followings things:
How to install @ionic/core
How to properly import and register components
How to import the required CSS
How to add the ion-ce class to show the app.
We should also note in the docs that using Ionic Core with another library will not have form/routing integrations that the Angular/React/Vue integrations have.
Reacted by Andreas Biørn-Hansen, Raymond Boswel, Itzy Sabo and Damiano Perri
I agree with this issue. I ended up finding an example repo for a vanilla typescript build but it's not official. Ionic is already very good by itself and for small apps, a vanilla build is a viable (and valid) option.
Also, the CLI creating only framework-bound projects makes it very hard to know if ionic should really be used by itself...
Activity
mrpbaum commentedon Jan 21, 2022
Still waiting for this. Please tell me how to import and use the components without a framework.
I intend to bundle with vite and use server side partials
gama410 commentedon Jun 17, 2022
I agree with this issue. I ended up finding an example repo for a vanilla typescript build but it's not official. Ionic is already very good by itself and for small apps, a vanilla build is a viable (and valid) option.
Also, the CLI creating only framework-bound projects makes it very hard to know if ionic should really be used by itself...
@p-baum For reference, here is the project that got me started: https://github.com/supertorpe/ionic-vanilla-ts
isabo commentedon Aug 1, 2022
These instructions were very helpful: https://www.npmjs.com/package/@ionic/core#custom-elements-build-experimental
The only thing missing is that we need to execute
document.documentElement.classList.add('ion-ce');which I got from ionic-team/ionic-framework#24252 (comment). Thank you @liamdebeasi !DamianoP commentedon Mar 2, 2023
yea, would be very useful!