@botim/unplugin-mp
v0.3.0
Published
Botim MiniProgram Plugin
Readme
@botim/unplugin-mp
A plugin that packages a Vue project (created with vue-cli or vite) into a Botim mini-program (.zip).
As of this version, the plugin no longer reads the
.botimconfig directory or generatesapp.json. Mini-program metadata such asapp.jsonis now managed by the developer platform. Projects still relying on.botim/*.jsoncan simply pin an older version (e.g.0.1.x) — no upgrade required.
Botim mini-program integration
1. Create a project with vue-cli
npm i -g vue
vue create mp-demo2. Install @botim/unplugin-mp
npm i -D @botim/unplugin-mp3. Configure vue.config.js
module.exports = {
configureWebpack: {
plugins: [
botimMpPlugin({
root: __dirname, // project root; all other paths are relative to this
distDir: "dist", // build output directory to package into the zip
apkDir: "dist/publish/bridge", // output directory for the generated package
}),
// If everything uses default values, the config can be omitted
botimMpPlugin(),
],
},
};The
configDir/patternsoptions are deprecated; passing them produces no error but has no effect.
