tjtanjin / react-chatbotify

A modern React library for creating a flexible and extensible chatbot.
https://react-chatbotify.com
MIT License
148 stars 68 forks source link

[Help] Probem using react-chabotify with Next.js - global css #80

Closed mhdawson closed 2 months ago

mhdawson commented 2 months ago

Help Description I have a react-chatbotify based application I wanted to run under Next.js but when I tried to move it over. If fails to run with a complaint about not being able to have Global css due to the css files for react-chatbotify under node_modules.

I have this next.config.js configuration file

/** @type {import('next').NextConfig} */
module.exports = {
  output: "standalone",
};

I did the the note in the FAQ related to https://github.com/tjtanjin/react-chatbotify/issues/32, but I believe that is a different issue.

Is this an known issue and if so is there any work around?

Additional context

tjtanjin commented 2 months ago

Hey @mhdawson, you are likely facing a similar issue that another user brought up on discord. I am making an assumption but it might be worth exploring the following options:

The first solution is recommended but the second solution is a viable workaround if you are unable to use app directory. Though that means there’s a need to manually perform this whenever you do a version upgrade. If you are keen, you can also take a look at the whole discord conversation here.

That said, feel free to share more details if the above information don't resolve your issue.

mhdawson commented 2 months ago

@tjtanjin many thanks for the quick response and suggestion. Will try out using the app directory.

tjtanjin commented 2 months ago

@tjtanjin many thanks for the quick response and suggestion. Will try out using the app directory.

No problem! Feel free to re-open this issue or reach out on discord anytime 😃

mhdawson commented 2 months ago

Thanks again, moving to the app directory fixed it for me.