Skip to content

About

Webpack plugin for ivormock

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

webpack-plugin-ivormock

Webpack plugin for ivormock.

Ivormock is made for development. Please use it in development environment only.

Install

npm install -D ivormock webpack-plugin-ivormock

Getting Start

In other webpack-based tools, such as vue-cli, create-react-app, webpack-plugin-ivormock is used just like other common plugins.

In your webpack.config.js:

const IvormockWebpackPlugin = require("webpack-plugin-ivormock");

const isDev = process.env.NODE_ENV === "development";

module.exports = {
    // ... 
    plugins: [
        //...
        // Only used in development envorioment
        isDev && new IvormockWebpackPlugin({
            mockPath: "mock",   // mock file path, relative to project root
            port: 3456,          // ivormock server port
            prefix: "/mock"     // request with "/mock" prefix will pass to ivormock 
        })
    ]
}

About

Webpack plugin for ivormock

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages