Skip to content

Commit

Permalink
feat: support xhs miniapp isXhsMiniApp shaking
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftj18 committed Dec 30, 2024
1 parent e04f1c3 commit bfaffd2
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions packages/platform-loader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## v1.1.2 beta

- Feat: support xhs-miniapp isXhsMiniApp
- Feat: support user platformMap, excludePlatformMap
- Feat: support loaderOptions.memberExpObjName
- Fix: Restrict the scope of MemberExpression, don't touch _xxxEnv.isIOS|isTaoBao|UA|appName, just handle env variables in platformMaps
- Fix: don't insert isWeex when import { isWeex as xxx } from 'universal-env'
- Fix: await SourceMapConsumer and destroy
- Perf: add hasPlatformContent check, avoid babel ast visit useless
- Refactor: rm unused transform O.p = true|false

## v1.1.1

- Fix: not match platform error
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rax-platform-loader",
"version": "1.1.1",
"version": "1.1.2-beta.8",
"description": "rax platform loader for helping remove other platform code",
"license": "BSD-3-Clause",
"main": "lib/index.js",
Expand Down
1 change: 1 addition & 0 deletions packages/platform-loader/src/TraverseImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const platformMap = {
'bytedance-microapp': ['isByteDanceMicroApp'],
'kuaishou-miniprogram': ['isKuaiShouMiniProgram'],
'baidu-smartprogram': ['isBaiduSmartProgram'],
'xhs-miniapp': ['isXhsMiniApp'],
};

module.exports = function traverseImport(options, inputSource, sourceMapOption) {
Expand Down

0 comments on commit bfaffd2

Please sign in to comment.