CodingTrain / Bizarro-Devin

12 stars 4 forks source link

Need to Simplify Paths [right now it desn't work] #31

Closed JuggernautJf closed 5 months ago

JuggernautJf commented 5 months ago

before

Imports are getting cryptic, so i thought to add to jsconfig.json:

{
  "compilerOptions": {
    "outDir": "dist",
    "module": "Node16",
    "target": "ES2022",
    "checkJs": false /* Typecheck .js files. */,
    "allowJs": true,
    "lib": ["ES2022"],
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"],
      "@lib/*": ["src/lib/*"],
      "@util/*": ["src/util/*"],
      "@commands/*": ["src/commands/*"],
      "@agent/*": ["src/lib/agent/*"]
    }
 },
  "exclude": ["node_modules"]
}

then, the imports will look like:

after

BUT right now this doesn't work

supercrafter100 commented 5 months ago

The config.js file has to manually be created. Using the contents of the example config.js

JuggernautJf commented 5 months ago

image

ref: https://www.npmjs.com/package/module-alias#usage

shiffman commented 5 months ago

This is working for me with a manual config.js file, I think that's good enough for now. This is not a general purpose tool (yet) just something that needs to work on one single computer :)