0.1.5 • Published 3 months ago

swc-plugin-pre-paths v0.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

swc-plugin-pre-paths

A SWC plugin to use path mapping. This may be needed in other plugins.

Installation

npm:

npm i -D swc-plugin-pre-paths

yarn:

yarn add -D swc-plugin-pre-paths

Usage

Via .swcrc

{
  "jsc": {
    "experimental": {
      "plugins": [
        [
          "swc-plugin-pre-paths",
          {
            "baseUrl": ".",
            "paths": {
              "app/*": ["./src/app/*"],
              "config/*": ["./src/app/_config/*"],
              "environment/*": ["./src/environments/*"],
              "shared/*": ["./src/app/_shared/*"],
              "helpers/*": ["./src/helpers/*"],
              "tests/*": ["./src/tests/*"]
            }
          }
        ]
      ]
    }
  }
}

Limits

This don't support multiple fall back locations.

{
  "paths": {
    "*": ["*", "generated/*"] // ⛔ don't support
  }
}
0.1.5

3 months ago

0.1.4

3 months ago

0.1.3

4 months ago

0.1.2

5 months ago

0.1.1

7 months ago

0.1.0

8 months ago