craco

React craco tailwind postcss integration

[亡魂溺海] 提交于 2021-01-27 18:43:57
问题 My project use craco to start/build, I wish to integrate tailwind postcss. I have follow this tutorial https://dev.to/ryandunn/how-to-use-tailwind-with-create-react-app-and-postcss-with-no-hassle-2i09 But as a result, I am suffering with this error: My config files looks like below: craco.config.js (this one looks like where problem lies, as I feel like the style may overriding craco style underneath, so it caused above error, but not 100% sure how to resolve this puzzl.) module.exports = {

Different ways to import files in React

别来无恙 提交于 2019-12-11 00:25:21
问题 currently the way I import files in the client folder of a react app is to use import statement which I believe uses Webpack. e.g. import cat_png from '../../game_book/images/cat.png'; This has its limitation because of Webpack configuration..... I was wondering if there is a different way to access files in the React project.... My problem with the current way of importing is that if I import a png it does give me a static link e.g. localhost:8000/static/media/cat.png but when I import a