Create alias
Closed this issue · 1 comments
devukurup commented
Create alias for commonly used directories.
Refer this
JaganKaartik commented
-
You can configure webpack aliases in the following manner in your
craco.config.js
file. This should be fine here. -
Posting the below snippet just for reference here:
const path = require(`path`) module.exports = { style: { postcss: { plugins: [require('tailwindcss'), require('autoprefixer')], }, }, webpack: { alias: { apis: path.resolve(__dirname, 'src/apis'), components: path.resolve(__dirname, 'src/components'), common: path.resolve(__dirname, 'src/components/Common'), utils: path.resolve(__dirname, 'src/utils'), }, }, }