{"bugs":{"url":"https://github.com/raxjs/miniapp/issues"},"dist":{"shasum":"0e41aee6b601ab0a5834fd39a94f3e24e57b2670","tarball":"https://registry.npmjs.org/miniapp-compile-config/-/miniapp-compile-config-0.1.7-2.tgz","fileCount":10,"integrity":"sha512-PKc313TZkMrBW2q72asoXeY7+FoBhajQnJ146Rn105Ubwsy6INrnVwrSccVm0N2hq9k1iFZ/8S3GED8Sg1WP8g==","signatures":[{"sig":"MEYCIQDqU8QgByb4F3DtMim7HbVloeW9gJS80C/vSNvCjCRc4QIhAMItmBDOaAWzFVS76G6eYM//3MjJDtEdPHNaXMKU5qnW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18991,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2yC1CRA9TVsSAnZWagAAQkoP/3maFIFy7wChcT1w46Gw\nh8tuqNjCxzi+5VKklWeXRO2NZ6F/ptwD9kunsEDifLSisOAZLaj3qWUvNHcs\n6mhqhnU4Hy97hN6X5qA1+Nq6GPWRhzv9GPtDQgO5hmalY2y8IpBbaGqXF9V8\njfEw7TlvwojrO+o4RscV4wywD+i0UqSuU8G4TwufPoVAYqE/higwW3iLIcEL\nDDwV2Q+RaXIJ8Y1FPTwVixlCuYx/90+EleMcHUewB8uYBgHGWRL/HXv5aSph\nT/vcBaPz8LTJwcOBwFOJdHzi4d0z7vR9WPoY1QAn4+zSLJsx6ZISWPL0wQSW\nQ4cfdEBfUUHCB9a1muSdgffiWJoQ9phR7wdobX+HAhnXQPiaeUjS2cH+4Ond\nFBpPdgiM+jM5QHr3ADs4wDzRrLAq9EiV7GBQs3hkuBgAISGAFlUdkItkV1/h\nRXejl6RztxpNZOB+5p/6XVywGYepKCBsmzGXr384nwb6Kzn3Ajrwdy7d59lL\n8zyNI8jVR9iySp5xso+ipcsZZaP986+9I1IIEV+0hbfRxXOCH/9wvxGlhFw+\nLOC4ecMzDRy0jjlHC1chH6MFSONLV9HGVXoo/VvDSyRhsYVp3LwHyOtqitCY\nJfCoEEI8J8Ca7Aufx95G1dqYFiMzuRCCb6ZwtbMSkWuuROWhUY6qmM/20ATS\nFraP\r\n=FRm0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/index.js","name":"miniapp-compile-config","author":{"name":"Rax Team"},"readme":"### miniapp-compile-config\n小程序编译时工程公共配置设置。\n\n### 方法\n#### setAppConfig\n##### 参数\n\n| 参数       | 类型   | 默认值 | 必填 | 描述                                                         |\n| ---------- | ------ | ------ | ---- | ------------------------------------------------------------ |\n| config     | object | -      | ✔️    | webpack chain config                                         |\n| userConfig | object | {}     |  ✘   | 当前小程序平台的用户配置，例如 `{ nativeConfig: { appId: 123 } }` |\n| options    | object | -      | ✔️    | options 子项见下表\n\n\n##### options 子项\n\n| 参数          | 类型   | 默认值 | 必填 | 描述                                                         |\n| ------------- | ------ | ------ | ---- | ------------------------------------------------------------ |\n| context       | object | -      | ✔️    | build plugin 上下文变量，包含运行时的各种环境信息            |\n| target        | string | -      | ✔️    | 构建的小程序平台类型，例如 `miniapp`/`wechat-miniprogram`    |\n| onGetWebpackConfig | function | -      | ✔️      | 在工程获取 webpack 时触发的函数，可以在 build plugin 的 api 中获取  |\n| entryPath       | string | -      | ✔️    | 入口路径           |\n| outputPath        | string | -      | ✔️    | 输出路径    |\n\n\n#### setComponentConfig\n##### 参数\n\n| 参数       | 类型   | 默认值 | 必填 | 描述                                                         |\n| ---------- | ------ | ------ | ---- | ------------------------------------------------------------ |\n| config     | object | -      | ✔️    | webpack chain config                                         |\n| userConfig | object | {}     |  ✘   | 当前小程序平台的用户配置，例如 `{ nativeConfig: { appId: 123 } }` |\n| options    | object | -      | ✔️    | options 子项见下表\n\n\n##### options 子项\n\n| 参数          | 类型   | 默认值 | 必填 | 描述                                                         |\n| ------------- | ------ | ------ | ---- | ------------------------------------------------------------ |\n| context       | object | -      | ✔️    | build plugin 上下文变量，包含运行时的各种环境信息            |\n| target        | string | -      | ✔️    | 构建的小程序平台类型，例如 `miniapp`/`wechat-miniprogram`    |\n| entryPath       | string | -      | ✔️    | 入口路径           |\n| outputPath        | string | -      | ✔️    | 输出路径    |\n\n### 使用\n\n```js\nconst { setAppConfig, setComponentConfig } = require('miniapp-compile-config');\n\n// 应用\nsetAppConfig(config, userConfig, { context, target, onGetWebpackConfig, entryPath, outputPath });\n\n// 组件\nsetComponentConfig(config, userConfig, { context, target, onGetWebpackConfig, entryPath, outputPath });\n```\n","license":"BSD-3-Clause","scripts":{"test":"echo \"Error: run tests from root\" && exit 1"},"_npmUser":{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"},"homepage":"https://github.com/raxjs/miniapp#readme","repository":{"url":"git+https://github.com/raxjs/miniapp.git","type":"git"},"_npmVersion":"6.13.4","description":"miniapp compile project config","directories":{"lib":"lib","test":"__tests__"},"maintainers":[{"name":"rax-publisher","email":"rax-public@alibaba-inc.com"}],"_nodeVersion":"12.5.0","dependencies":{"terser":"^4.8.0","webpack":"^4.44.1","chokidar":"^3.4.2","fs-extra":"^8.0.1","memory-fs":"^0.5.0","ts-loader":"^8.0.3","json-loader":"^0.5.7","jsx2mp-loader":"0.4.21-0","jsx2mp-runtime":"0.4.18-1","rax-compile-config":"^0.2.15","copy-webpack-plugin":"^6.0.3","miniapp-builder-shared":"0.1.9-0","rax-miniapp-config-webpack-plugin":"1.3.0-0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"webpack":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/miniapp-compile-config_0.1.7-2_1608196276707_0.7671014144271711","host":"s3://npm-registry-packages"},"_id":"miniapp-compile-config@0.1.7-2","version":"0.1.7-2"}