@lark-opdev/block-bitable-webpack-utils
v0.1.7
Published
提供给外部开发者的用于启动调试环境的 webpack 插件
Downloads
709
Readme
Bitable-Webpack-Utils
提供给外部开发者的用于启动调试环境的 webpack 插件
Install
npm install @lark-opdev/block-bitable-webpack-utils -D
Usage
// webpack.config.js
const {
BitableAppWebpackPlugin,
opdevMiddleware,
} = require('@lark-opdev/block-bitable-webpack-utils');
module.exports = {
plugins: [
// ...
new BitableAppWebpackPlugin({ open: false }),
],
devServer: {
// ...,
// Webpack 5
setupMiddlewares: (middlewares, devServer) => {
middlewares.push(opdevMiddleware(devServer))
return middlewares; // Use Middleware
},
// Webpack 4
after(app, devServer, compiler) {
app.use(opdevMiddleware(devServer, compiler)); // Use Middleware
}
},
}