Help

Absolute Imports in React

Topic Labels: Custom Extensions
638 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Andrew_Elmore
4 - Data Explorer
4 - Data Explorer

Hi all, I would like to use absolute imports in my app, I have the following file structure

./
  /.block
  /build
  /node_modules
  /src
    /components
      /NavBar
        index.js
    /UI
      /Input
        index.js
    App.js
    index.js
  block.json
  package.json
  jsconfig.json

To avoid a bunch of …/…/ in my imports I am trying to use absolute imports.

I have

{
  "compilerOptions": {
    "baseUrl": "src"
  },
  "include": ["src"]
}

In my jsconfig.json however my absolute imports are not being found when I run the app in Airtable. Anyone have any thoughts?

0 Replies 0