diff --git a/build/build.qa.js b/build/build.qa.js index 9ff1d5117b32131336edf1e69b228531f440c09b..b4ac950c83f6ea8b32f12d34bd270b338d1c901a 100644 --- a/build/build.qa.js +++ b/build/build.qa.js @@ -36,31 +36,31 @@ dsl.onInitApp(function({ });` }) const appCode = appOutput[0].code - // const pageBundle = await rollup.rollup(genConfig('page')) - // const { - // output: pageOutput - // } = await pageBundle.generate({ - // format: 'iife', - // banner: ` - // dsl.onInitPage(function({ - // $app_require$, - // Vue - // }) { - // `, - // footer: ` - // });` - // }) - // const pageCode = pageOutput[0].code + const pageBundle = await rollup.rollup(genConfig('page')) + const { + output: pageOutput + } = await pageBundle.generate({ + format: 'iife', + banner: ` + dsl.onInitPage(function({ + $app_require$, + Vue + }) { + `, + footer: ` + });` + }) + const pageCode = pageOutput[0].code const vueCode = fs.readFileSync(path.resolve(__dirname, '../packages/uni-quickapp/assets/' + filename)) fs.writeFileSync( path.resolve(__dirname, '../packages/uni-quickapp/dist/' + filename), - vueCode + bridgeCode + appCode, { + vueCode + bridgeCode + appCode + pageCode, { encoding: 'utf8' } ) - if (process.env.NODE_ENV === 'production') { // 命令会执行dev,prod两次,仅prod时执行copy + if (process.env.NODE_ENV === 'production') { // 命令会执行dev,prod两次,仅prod时执行copy const componentsSrc = path.resolve(__dirname, '../src/platforms/quickapp/view/components/**/*') const componentsDest = path.resolve(__dirname, '../packages/uni-quickapp/components') diff --git a/packages/uni-quickapp/components/button/button.vue b/packages/uni-quickapp/components/button/button.vue index 9ae2cd5cc2dd0dddd92b957c28abfa98eb978ac1..1c88399143d910d5502fd7ab10a8c0325536973c 100644 --- a/packages/uni-quickapp/components/button/button.vue +++ b/packages/uni-quickapp/components/button/button.vue @@ -1,5 +1,5 @@