Webpack Quick Start
1. Install
bash
pnpm add -D mokupbash
npm install -D mokupbash
yarn add -D mokupbash
bun add -d mokup2. Add the plugin
js
const { mokupWebpack } = require('mokup/webpack')
const withMokup = mokupWebpack({
entries: {
dir: 'mock',
prefix: '/api',
},
})
module.exports = withMokup({})3. Start dev server
Run your webpack dev server:
bash
pnpm webpack servebash
npm exec webpack servebash
yarn webpack servebash
bunx webpack serve4. Verify
http://localhost:8080/api/usershttp://localhost:8080/__mokup
Next
See the full options in Webpack Plugin.