Webpack
Use the Webpack plugin to run Interceptor before builds and on watch.
Install
bash
pnpm add -D @wrkspace-co/interceptorConfigure
js
const { InterceptorWebpackPlugin } = require("@wrkspace-co/interceptor/webpack");
module.exports = {
plugins: [new InterceptorWebpackPlugin({ configPath: "interceptor.config.ts" })]
};Notes
- When Webpack runs in watch mode, Interceptor runs in watch mode too.
- The plugin loads
.envfrom your project root.