Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: v6 beta not working with react and vite #23671

Closed
4 of 6 tasks
aaronksaunders opened this issue Jul 22, 2021 · 3 comments
Closed
4 of 6 tasks

bug: v6 beta not working with react and vite #23671

aaronksaunders opened this issue Jul 22, 2021 · 3 comments
Labels

Comments

@aaronksaunders
Copy link

Prequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

Vite, Rollup, and ESBuild — oh my!
As an added bonus, Framework v6 will be usable with tooling such as Vite, Rollup, and ESBuild, giving you even more options for building apps. This is something that developers have been asking us about for a while, so we are excited to roll this support out.

Tried following the project upgrade directions for using with react. Started a new project using vite. Added IonApp to project and the application crashed.

Code does not run, error message attached below

Expected Behavior

code to run without error

Steps to Reproduce

import React from "react";
import "./App.css";
import { IonApp } from "@ionic/react";

function App() {

  return (
    <IonApp>
      <p>Hello Vite + React!</p>
    </IonApp>
  );
}

export default App;

Code Reproduction URL

No response

Ionic Info

No response

Additional Information

Screen Shot 2021-07-21 at 9 44 35 PM

@ionitron-bot ionitron-bot bot added the triage label Jul 22, 2021
@liamdebeasi
Copy link
Contributor

Thanks for the issue! The new Vite/ESBuild/Rollup support is dependent on the Custom Elements build (mentioned above in the paragraph you quoted from the blog). As of now the Custom Elements build is only in Ionic Vue, so Vite will not work with Ionic React at the moment.

I am going to close this issue since things are working as intended, but we are tracking Custom Elements support internally and will be sure to update the community when support has landed in Ionic React.

@aaronksaunders
Copy link
Author

thanks

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 21, 2021

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants