We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack alias support is not working as it's not implemented yet. Is there a plan to add it?
import Utility from '../../utilities/utility'; // can be written as with alias import Utility from 'Utilities/utility';
There are two ways to achieve it. One adding jsconfig.js or jscong.ts which nextjs does. https://nextjs.org/docs/advanced-features/module-path-aliases
jsconfig.js
jscong.ts
Or using flareact.config.js using resolve: {alias: {} I have added for this one subhendukundu@57d6e19
flareact.config.js
resolve: {alias: {}
Please let me know if you would prefer both ways, I can create a PR.
The text was updated successfully, but these errors were encountered:
This would be great thing to add.
Sorry, something went wrong.
You can just modify your webpack config For example, I have @ alias that maps to src folder
@
src
const path = require('path'); module.exports = { webpack: (config, { dev, isWorker, defaultLoaders, webpack }) => { config.resolve.alias = {...(config.resolve.alias || {})} config.resolve.alias['@'] = path.resolve(__dirname, 'src') return config; }, };
And, if you're using TypeScript, don't forget about tsconfig.json:
tsconfig.json
{ "compilerOptions": { "paths": { "@/*": ["./src/*"] } } }
No branches or pull requests
Describe the problem:
Webpack alias support is not working as it's not implemented yet.
Is there a plan to add it?
There are two ways to achieve it. One adding
jsconfig.js
orjscong.ts
which nextjs does.https://nextjs.org/docs/advanced-features/module-path-aliases
Or using
flareact.config.js
usingresolve: {alias: {}
I have added for this onesubhendukundu@57d6e19
Please let me know if you would prefer both ways, I can create a PR.
The text was updated successfully, but these errors were encountered: