@tarojs/plugin-platform-nezha
This is the plugin to make tarojs support nezha.
Build
yarn build
Usage
In the taro project, add @tarojs/plugin-platform-nezha into config/index.js
# at config/index.js
const config = {
...
plugins: ["@tarojs/plugin-platform-nezha"],
...
}
Then use tarojs-cli run command to start dev process
cd [path-to-taro-project]
npm run build:nezha -- --watch
or build the project without watch
taro build --type nezha
Maybe some one need to specify the plugin to the path of plugin's project instead of to install it by npm. If so, he need to add webpack-chain config into config/index.js
# at config/index.js
const config = {
...
plugins: [`${path-to-taro-platform-plugin}`]
...
mini: {
...
webpackChain(chain, webpack) {
chain.merge({
...
resolve: {
alias: {
"@tarojs/shared": [`${path-to-app-project}/node_modules/@tarojs/shared/dist`]
"@tarojs/plugin-platform-nezha": [`${path-to-taro-platform-plugin}`]
},
},
...
});
},
...
}
...
}
NOTICE
@tarojs/shared must be setted to the same package when use path to import plugin, otherwise the compiled app will not register native apis!