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

Better documentation

Open as-zlynn-philipps opened this issue 2 years ago • 0 comments

There are some nuances of the root option that are not explained in the README, or even the docs, for instance:

{
  "plugins": [
    ["module-resolver", {
      "root": ["./src"], // setting this to `./` worked at first glance, but it broke a lot of things in my app
      "alias": {
        "test": "./test", // it's not clear whether this is relative to the `root` specified above (it's not, UNLIKE tsconfig.json)
        "underscore": "lodash"
      }
    }]
  ]
}

In addition, none of the docs actually explain what this plugin does behind the scenes, nor do they provide a means to troubleshoot. Just saying, a lot of developers want aliases, but may not realize how much this plugin really affects their builds (🙋‍♂️ me).

as-zlynn-philipps avatar Mar 30 '22 20:03 as-zlynn-philipps