Skip to content

Instantly share code, notes, and snippets.

🐢
Better but slow

Yeongsu Han heyman333

🐢
Better but slow
Block or report user

Report or block heyman333

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View diff2.diff
{
"compilerOptions": {
+ "baseUrl": "./src",
"esModuleInterop": true,
"jsx": "react",
"lib": ["es6"],
"moduleResolution": "node",
"noEmit": true,
"strict": true,
"target": "esnext",
View diff.diff
settings: {
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
+ 'babel-module': {},
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.native.js'],
},
View plugin.json
{
"plugins": [
[
"module-resolver",
{
"root": ["./src"],
"alias": {
"underscore": "lodash",
"icons": "./assets/icons",
"imgs": "./assets/imgs",
View config.js
// babel.config.js
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'module-resolver',
{
root: ['./src'],
},
],
View gist:73bb0245247d8cec4dc797a63156ca97
// Use this:
import MyUtilFn from 'utils/MyUtilFn'
// Instead of that:
import MyUtilFn from '../../../../utils/MyUtilFn'
You can’t perform that action at this time.