Questions tagged [customize-cra]

12 questions
4
votes
1 answer

Change antd variables at runtime with craco

I have to be able to change ant design variables at runtime (not via theme less files). I've found plenty of examples of this using customize-cra and react-app-rewire-less, but none seem to work with craco. I have to use craco because I'm also using…
Mateus Wolkmer
  • 706
  • 4
  • 26
2
votes
1 answer

How do I setup jest to use custom babel plugin in create-react-app project?

I have a CRA project and i use react-intl package, with its babel-plugin-formatjs (to auto generate message IDs for translation). I created wrapper around the babel-plugin-formatjs that gets some additional info about project and In order to use the…
Eliran
  • 320
  • 2
  • 15
2
votes
1 answer

Adding csp-html-webpack-plugin dosnt load my react webpage

I am using the npm react-app-rewired customize-cra csp-html-webpack-plugin to give my application more security following this example https://medium.com/@nrshahri/csp-cra-324dd83fe5ff My config-overrides.js looks like this const { override } =…
1
vote
0 answers

How to exclude/override plugins included by babel-preset-react-app

I want to use propTypes even in production mode (not recommended but my React app needs it). As you may know propTypes are removed by babel-plugin-transform-react-remove-prop-types plugin. this plugin is added by babel-preset-react-app in this file:…
1
vote
1 answer

.less files not getting picked up by less-loader

I have created a react app using create-react-app and I am using less for css. My app builds correctly, but none of the less files are loaded in build/static folder I am using customize-cra with react-app-rewired to add a loader for less…
Jatin
  • 31
  • 2
  • 5
0
votes
1 answer

How to solve Content not from webpack is served from

I add react-app-rewired and customize-cra to my project. when I use "npm start" run my project,and I get an error like Content not from webpack is served from enter image description here here's my package.json file { "name": "geek-app", …
0
votes
0 answers

React + Less + customize-cra

I have two files with variables - src/lessVariables/Blue.less and src/lessVariables/Neutral.less I try to import variables from files @import "./src/lessVariables/Blue.less" .Container { background: @blue500 } And I have "Invalid dependencies have…
BoomBlum
  • 11
  • 1
0
votes
1 answer

unrecognized input error while building tailwind with customize-cra-less-loader in react tsx

I am trying to use tailwind with less support. I have used customize-cra for webpack and customize-cra-less-loader to load less in my react app. Everything is working fine except the generated tailwind.output.css. It has some css properties with…
0
votes
1 answer

react-app-rewired requiring giving mini-css-extract-plugin

I am currently using react-app-rewired with customize-cra. Currently right now, npm start works but npm run build gives the following error. Error: You forgot to add 'mini-css-extract-plugin' plugin Not exactly sure whats happening, here is my…
0
votes
0 answers

Customize-cra config-overrides.js is not working

I am working on the create-react-app project with typescript. I am trying to use _ (lodash) globally. I followed manuals step by step trying to figure out how to do it, but without any success. I followed this tutorial…
M.P.
  • 85
  • 1
  • 11
0
votes
1 answer

How to add Preact to existing create-react-app project?

I have a React project that I'd like to convert to Preact to save on the bundle size. I followed this recommendation, adding the following elements to my code: Change the package.json: "scripts": { "start": "react-app-rewired start", …
mmz
  • 1,011
  • 1
  • 8
  • 21
0
votes
2 answers

customize-cra - Support for the experimental syntax 'jsx' isn't currently enabled

I am using react-app-rewired to configure my CRA project as I was having issues with 2 co-existing versions of React which I'm sure is a very common use-case for react-app-rewired/customize-cra. Everything has been fine until I required installing…