Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Absolute Imports in React

Topic Labels: Custom extensions
337 0
cancel
Showing results for 
Search instead for 
Did you mean: 

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