Closed dogeow closed 2 years ago
What is in your config-overrides file? What webpack modules/plugins are you adding to the CRA configuration?
The error message given is saying that the devServer
configuration overrides specified contain an invalid option writeToDisk
. That'll either be something you've added yourself to your config-overrides.js file, or something that is being added as a result of a webpack plugin/module that you're adding. It's a configuration error in your local environment/project, not a bug in react-app-rewired as react-app-rewired doesn't itself change the CRA configuration (it simply enables you to change the configuration).
/* eslint-disable react-hooks/rules-of-hooks */
const { override, useBabelRc, overrideDevServer } = require("customize-cra");
const devServerConfig = () => (config) => {
return {
...config,
writeToDisk: true,
};
};
module.exports = {
webpack: override(useBabelRc()),
devServer: overrideDevServer(devServerConfig()),
};
Example➜~/WebstormProjects/antic(master✗)» yarn start [11:53:03] yarn run v1.22.4 $ react-app-rewired start Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.