reactour: React tour running on development mode but fails when built with Vitejs!

Hello, we are using @reacttour/tour as you know v2 and specific version is v2.10.2. Our project infrastructure has vitejs v2 and we are building our project with vitejs.

While I was in development mode, I completed my development with reactour. Everything was working properly at this stage. After that I must build the project but, I got an error. Error message is below:

Screen Shot 2022-04-16 at 15 01 35

If you change the import statement in the tour.esm.js on 1st line shown in the photo above to import { useState, useCallback, useEffect, useContext } from 'react';, the problem goes away.

I also looked for other solutions but i cannot resolve this issue differently.

I created a mini project so that you can understand reactour’s build process more easily. You can find out this mini project following repository: https://github.com/legionairre/vite-react-ts-reactour

In this repository if you run npm run dev you will see everything is working fine. However, if you run npm run build you will see the error message and cannot build the project anymore.

@mustafaakin fyi.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 15 (4 by maintainers)

Most upvoted comments

Hi all and thanks for open the Issue and for the pretty detailed steps to reproduce it ❤️ . I’m sorry for the late reply. I’ll investigate right now and back to you.

Sentry alert that the ResizeObserver loop limit has been exceeded. Do you know what this is?

Honestly don’t know what they mean. Mind open another issue in case you could get more info related?

Thanks!

It works now with the latest update. @elrumordelaluz thank you very much. This is not relevant, but we are getting a Sentry alert that the ResizeObserver loop limit has been exceeded. Do you know what this is?

You’re amazing @elrumordelaluz this fixed it. Thank you!