Registry / web-framework / okam-build

okam-build

JSON →
library0.4.27-alpha.0jsnpmunverified

Build tool for Okam framework targeting Chinese mini-program platforms (Baidu Smart Mini Programs and WeChat Mini Programs). Current version 0.4.27-alpha.0, alpha release. Provides optimized builds for mini-program development with proper tree-shaking and bundling. Key differentiators: dedicated to Okam framework, supports multi-platform mini-program builds (Baidu, WeChat)

npm install okam-build
INSTALL
IMPORT
SIG · OKAM-BUILD
O
okam-build
web-frameworkjavascriptv0.4.27-alpha.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

build
const { build } = require('okam-build')
import { build } from 'okam-build'
CJS-only, no ESM support
createApp
const { createApp } = require('okam-build')
const createApp = require('okam-build').createApp
Destructuring is preferred
default
const okamBuild = require('okam-build')
import okamBuild from 'okam-build'
No default export; use namespace import

Shows how to run a build for Baidu Smart Mini Program platform using okam-build.

const { build } = require('okam-build'); build({ type: 'swan', root: './src', output: './dist', config: { projectConfig: { appid: process.env.APPID ?? '' } } }).then(() => { console.log('Build complete'); }).catch(err => { console.error('Build failed', err); });
okam --version
Debug
Known issues
gotchaUse require(), not ESM imports
fix
Use const { build } = require('okam-build') instead of import statements.
affects: >=0
breakingAPI change in version 0.4.x: build function parameters restructured
fix
Check documentation for correct configuration object shape; old positional arguments removed.
affects: >=0.4.0 <0.5.0
deprecatedSupport for older platform versions is deprecated
fix
Use latest platform SDKs (e.g., Baidu Swift 3.0+).
affects: >=0.4.0
Errors
Common errors & fixes
Error: Cannot find module 'okam-core'
okam-core peer dependency not installed
fix
npm install okam-core
TypeError: build is not a function
Wrong import method (ESM import instead of require)
fix
Change import to const { build } = require('okam-build')
Error: Invalid platform type 'wx'
Unsupported or misspelled platform
fix
Use valid platform: 'swan' for Baidu, 'wx' for WeChat is not supported (use 'wechat')
Upgrade
Version history
0.4.27-alpha.0latest on npm
Audit
Dependencies
okam-coreoptionalCore Okam framework required for building Okam components
Agent activity
2 hits · last 30 days
node
2
Resources
okam-build — npm install okam-build · libregistry