提交 82b680d4 编写于 作者: fxy060608's avatar fxy060608

feat(h5): inject getApp,getCurrentPages

上级 cd6afc80
......@@ -130,7 +130,7 @@ function inject(options: InjectOptions) {
const sourceMap = options.sourceMap !== false
return {
name: 'inject',
name: 'uni:inject',
transform(code, id) {
if (!filter(id)) return null
......@@ -271,5 +271,7 @@ function inject(options: InjectOptions) {
export const buildPluginInject: Plugin = inject({
exclude: /\.[n]?vue$/,
'__GLOBAL__.': '@dcloudio/uni-h5',
'uni.': '@dcloudio/uni-h5'
'uni.': '@dcloudio/uni-h5',
getApp: ['@dcloudio/uni-h5', 'getApp'],
getCurrentPages: ['@dcloudio/uni-h5', 'getCurrentPages']
})
......@@ -13,7 +13,7 @@ const targets = (exports.targets = fs.readdirSync('packages').filter(f => {
)
} catch (e) {}
return false
}))
})).sort((a, b) => (a === 'uni-shared' ? -1 : 0))
exports.fuzzyMatchTarget = (partialTargets, includeAllMatching) => {
const matched = []
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册