Open LeandroHornos opened 2 years ago
Not tested in the Next environment but I guess the following approach may be a possible workaround. Please remove the CSS importing line in kekule.webpack.prod.js
(require("./themes/default/kekule.css");
), and require this CSS file in your own _app.js
instead. Have a try of that?
It worked! Thank you very much!
@LeandroHornos what did your Webpack override(next.config.js
) look like? I'm having trouble integrating the react-app-rewired
solution to nextjs. Thanks!
I've been playing with Kekule composer widget in React using this workaround to make it work with webpack when using create-react-app
Now I'm trying to use the component in a Next.js app created with create-next-app but I'm having this issue when trying to import kekule from the npm package.
Failed to compile ./node_modules/kekule/dist/themes/default/kekule.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules\kekule\dist\kekule.webpack.prod.js
Any help would be greatly appreciated, thanks!!!