0.0.5 • Published 3 years ago

@hyext-mock/beyond-plugin-babel-mock v0.0.5

Weekly downloads
3
License
ISC
Repository
-
Last release
3 years ago

@hyext-mock/beyond-plugin-babel-mock

A mock resolution by babel.

Usage

{
  "plugins": [
    [
      "@hyext-mock/beyond-plugin-babel-mock",
      {
        "match": [
          ["@hyext-inner/hyext-data-core", "./src/mock/modules/hyext-data-core"],
          ["\\/events", "./src/mock/events"]
        ],
        "enable": false
      }
    ]
  ]
}

Options

match - a match config list

it's member are both match item, details as follow:

  • match:Array

    • matchItem[0]:string - match RE string.

    • matchItem[1]:string - replace string, it could be a file path or npm module name, the file path should be a relative path(it will add with cwd prefix) or absolute path.

  • enable: boolean, if false, it will disable mock, default is true.

0.0.5

3 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.1

4 years ago

0.0.2

4 years ago

0.0.1-beta.2

4 years ago

0.0.1-beta.1

4 years ago

0.0.1-beta.0

4 years ago