develog

[react] babel-plugin-root-import 본문

카테고리 없음

[react] babel-plugin-root-import

냐옴 2023. 2. 27. 16:00

 

https://henriquetavares.com/babel-root-import-ts-reactjs-react-native/

 

Henrique Tavares — think different.

Heeeeeey Codeeeeers Today I came to bring a very cool solution for you who are tired of having to import into your TypeScript projects in ReactJS and React Native, like this: import Header from '../../../../Components/Header' How about … do this up there

henriquetavares.com

 

https://medium.com/geekculture/making-life-easier-with-absolute-imports-react-in-javascript-and-typescript-bbdab8a8a3a1

 

Making Life Easier with Absolute Imports - React in Javascript and Typescript

Now, you can remove the hassle of putting ../../../ in your imports with the arrival of Absolute Imports. Lets use this in Js and Ts.

medium.com

 

https://github.com/entwicklerstube/babel-plugin-root-import

 

GitHub - entwicklerstube/babel-plugin-root-import: Add the opportunity to import modules by the root path

Add the opportunity to import modules by the root path - GitHub - entwicklerstube/babel-plugin-root-import: Add the opportunity to import modules by the root path

github.com

 

https://www.npmjs.com/package/babel-plugin-root-import

 

babel-plugin-root-import

Babel Plugin to enable relative root-import. Latest version: 6.6.0, last published: 2 years ago. Start using babel-plugin-root-import in your project by running `npm i babel-plugin-root-import`. There are 118 other projects in the npm registry using babel-

www.npmjs.com

 

Comments