babel-plugin-module-resolver icon indicating copy to clipboard operation
babel-plugin-module-resolver copied to clipboard

my path resolutions are adding two dots in front instead of one ".."

Open ELI7VH opened this issue 5 years ago • 3 comments

my config:

    [
      "babel-plugin-module-resolver",
      {
        "root": ["./src"],
        "alias": {
          "components": "./components",
          "constants": "./constants",
          "containers": "./containers",
          "layout": "./layout",
          "models": "./models",
          "modules": "./modules",
          "routes": "./routes",
          "static": "./static",
          "store": "./store",
          "types": "./types",
          "utils": "./utils"
        }
      }
    ]

please just tell me i did a dumb. I am at the end of my rope.

from the index.tsx, import App from 'containers/App' becomes import App from '../containers/App'

it should just be a single . not ..

ELI7VH avatar Aug 07 '20 23:08 ELI7VH

same, version 4.0.0

ilya144 avatar Sep 19 '20 12:09 ilya144

don't use root, just add ./src/ to all path,

"components": "./src/components"

ilya144 avatar Sep 19 '20 12:09 ilya144

don't use root, just add ./src/ to all path,

"components": "./src/components"

thx! it was useful for me

guoenyue avatar Dec 15 '20 05:12 guoenyue