design-system-react
design-system-react copied to clipboard
How to Setup in CRA 4.x the documentation has no steps for setting up while using the latest CRA version.
Thanks for opening your first issue! :wave: If you have found this library helpful, please star it. A maintainer will try to respond within 7 days. If you haven’t heard anything by then, please bump this thread.
Any update on this?
@pardhav and anyone else who may be struggling with this, the following worked for me using the latest version of CRA:
- Follow all the steps in the CRA 2.x guide, but also install
react-app-rewire-babel-loaderto your dev dependencies - Replace the contents of config-overrides.js with the following:
const path = require("path");
const fs = require("fs");
const rewireBabelLoader = require("react-app-rewire-babel-loader");
const appDirectory = fs.realpathSync(process.cwd());
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
module.exports = function override(config, env) {
config = rewireBabelLoader.include(
config,
resolveApp("node_modules/@salesforce/design-system-react"),
);
return config;
};
This issue has been automatically marked as stale, because it has not had recent activity. It will be closed if no further activity occurs. Maintainers are responsible for tech debt and project health. This is most likely a new components or component feature request. Please submit a pull request for or request feedback on this feature. Thank you.