parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀

Home Page:https://parceljs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parcel and Redux Toolkit Query: import of api created with createApi crash the app

tommaso-bissoli opened this issue · comments

Hi Parcel team,

I think I found a Parcel bug using Parcel with React Toolkit Query.

The problem, as far as I can understand, I suppose should occur during the trainspilation of createApi of RTKQ.

I'm learning to use Parcel, React and Redux and I was doing a simple recap of the basics I learned by creating a simple Parcel / React app with a simple component showing the results of a query made with RTKQ.

I didn't even start to develop the component yet to conclude the test because the app crashes at the precise moment I import the exported const api from /src/api/index.js, the module in which I create the api with RTKQ.

It is a very basic app with a very basic stack:

  • Parcel
  • React
  • React Redux
  • Redux Toolkit

I've attached the full log of the error. Here I report just the begin:
createApi.ts:333 Uncaught TypeError: Cannot convert undefined or null to object

This is the repo of my test:
https://Tommy81@bitbucket.org/Tommy81/redux-learning.git

You just have to execute npm run start to get the crash in the browser console.

Please I don't want to give up using RTDQ with Parcel...
I spent al lot of hours studying... ^^

Can you help me?

parcel-rtkq-bug.log

Still a duplicate of #7622, unfortunately