0.1.15 • Published 9 months ago

swc-plugin-pre-paths v0.1.15

Weekly downloads
-
License
MIT
Repository
github
Last release
9 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

You can check the compatibility of versions on https://plugins.swc.rs/

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.11

11 months ago

0.1.12

10 months ago

0.1.13

10 months ago

0.1.14

9 months ago

0.1.15

9 months ago

0.1.10

11 months ago

0.1.8

12 months ago

0.1.7

1 year ago

0.1.9

11 months ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago