Constructor
new MockRequestsWebpackPlugin(mocksDir, mockEntryFile, activateMocks, optionsopt)
- Source:
Activates mock-requests based on the provided parameters.
Parameters:
Name |
Type |
Attributes |
Description |
mocksDir |
string
|
|
Directory of all mock files/logic, including the `mockEntryFile`. |
mockEntryFile |
string
|
|
Entry file that calls `MockRequests.configure()`. |
activateMocks |
boolean
|
|
If mocks determined by `mockEntryFile` should be activated or not. |
options |
Object
|
<optional>
|
Properties
Name |
Type |
Attributes |
Default |
Description |
pathsAreAbsolute |
boolean
|
<optional>
|
false
|
If `mocksDir` and `mockEntryFile` are absolute paths instead of relative. |
transpileMocksDir |
boolean
|
<optional>
|
true
|
If the files within `mocksDir` should be transpiled. |
|