Skip to content

Commit a9d773e

Browse files
authored
Merge branch 'master' into fix-rn-onAppHide
2 parents cd58729 + b321604 commit a9d773e

8 files changed

Lines changed: 14 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- run: |
2121
npm i
2222
echo "//registry.npmjs.org/:_authToken=\${NODE_AUTH_TOKEN}" >> $HOME/.npmrc 2> /dev/null
23-
npm run tsc:build
23+
npm run build:tsc
2424
npm run lerna:publish
2525
env:
2626
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v4
10-
- run: npm i && npm run tsc:build
10+
- run: npm i && npm run build:tsc
1111

1212
lint:
1313
runs-on: ubuntu-latest

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"docs:dev": "vitepress dev docs-vitepress",
1313
"docs:build": "vitepress build docs-vitepress",
1414
"docs:preview": "vitepress preview docs-vitepress",
15-
"tsc:build": "npm --workspace=./packages/webpack-plugin run build"
15+
"build:tsc": "npm --workspace=./packages/webpack-plugin run build"
1616
},
1717
"devDependencies": {
1818
"@babel/core": "^7.25.2",

packages/webpack-plugin/lib/dependencies/DynamicEntryDependency.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const toPosix = require('../utils/to-posix')
66
const async = require('async')
77
const parseRequest = require('../utils/parse-request')
88
const hasOwn = require('../utils/has-own')
9-
const { RetryRuntimeGlobal } = require('../retry-runtime-module')
9+
const { RetryRuntimeGlobal } = require('./RetryRuntimeModule')
1010

1111
class DynamicEntryDependency extends NullDependency {
1212
constructor (range, request, entryType, outputPath = '', packageRoot = '', relativePath = '', context = '', extraOptions = {}) {

packages/webpack-plugin/lib/dependencies/ImportDependencyTemplate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const ModuleDependency = require('webpack/lib/dependencies/ModuleDependency')
2-
const { RetryRuntimeGlobal } = require('../retry-runtime-module')
2+
const { RetryRuntimeGlobal } = require('./RetryRuntimeModule')
33
const parseRequest = require('../utils/parse-request')
44

55
class ImportDependencyTemplate extends (

packages/webpack-plugin/lib/retry-runtime-module.js renamed to packages/webpack-plugin/lib/dependencies/RetryRuntimeModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const Template = require('webpack/lib/Template')
22
const RuntimeModule = require('webpack/lib/RuntimeModule')
33

4-
const RetryRuntimeGlobal = '__webpack_require__.__retry'
4+
const RetryRuntimeGlobal = '__webpack_require__.mpxR'
55

66
class RetryRuntimeModule extends RuntimeModule {
77
constructor () {

packages/webpack-plugin/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const VirtualModulesPlugin = require('webpack-virtual-modules')
7777
const RuntimeGlobals = require('webpack/lib/RuntimeGlobals')
7878
const LoadAsyncChunkModule = require('./react/LoadAsyncChunkModule')
7979
const ExternalModule = require('webpack/lib/ExternalModule')
80-
const { RetryRuntimeModule, RetryRuntimeGlobal } = require('./retry-runtime-module')
80+
const { RetryRuntimeModule, RetryRuntimeGlobal } = require('./dependencies/RetryRuntimeModule')
8181
const checkVersionCompatibility = require('./utils/check-core-version-match')
8282

8383
checkVersionCompatibility()

packages/webpack-plugin/lib/template-compiler/compiler.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,7 +1383,11 @@ function processEvent (el, options) {
13831383
const targetConfigs = isCapture ? eventConfigMap[type].captureConfigs : eventConfigMap[type].configs
13841384
targetConfigs.push(Object.assign({ name }, parsedFunc))
13851385
if (modifiers.indexOf('proxy') > -1 || options.forceProxyEvent) {
1386-
eventConfigMap[type].proxy = true
1386+
if (isCapture) {
1387+
eventConfigMap[type].captureProxy = true
1388+
} else {
1389+
eventConfigMap[type].proxy = true
1390+
}
13871391
}
13881392
}
13891393
}
@@ -1423,10 +1427,10 @@ function processEvent (el, options) {
14231427
}
14241428

14251429
for (const type in eventConfigMap) {
1426-
const { configs = [], captureConfigs = [], proxy } = eventConfigMap[type]
1430+
const { configs = [], captureConfigs = [], proxy, captureProxy } = eventConfigMap[type]
14271431

14281432
let needBubblingBind = isNeedBind(configs, proxy)
1429-
let needCaptureBind = isNeedBind(captureConfigs, proxy)
1433+
let needCaptureBind = isNeedBind(captureConfigs, captureProxy)
14301434

14311435
const escapedType = dash2hump(type)
14321436
// 排除特殊情况

0 commit comments

Comments
 (0)