diff --git a/packages/webpack-plugin/lib/loader.js b/packages/webpack-plugin/lib/loader.js index 9061f21083..fb672e57fd 100644 --- a/packages/webpack-plugin/lib/loader.js +++ b/packages/webpack-plugin/lib/loader.js @@ -280,7 +280,7 @@ module.exports = function (content) { let ctor = 'App' if (ctorType === 'page') { // swan也默认使用Page构造器 - if (mpx.forceUsePageCtor || mode === 'ali' || mode === 'swan') { + if (mpx.forceUsePageCtor || mode === 'ali') { ctor = 'Page' } else { ctor = 'Component' diff --git a/packages/webpack-plugin/lib/native-loader.js b/packages/webpack-plugin/lib/native-loader.js index 565ccbf8b1..60d38ab1b7 100644 --- a/packages/webpack-plugin/lib/native-loader.js +++ b/packages/webpack-plugin/lib/native-loader.js @@ -214,7 +214,7 @@ module.exports = function (content) { let ctorType = 'app' if (pagesMap[resourcePath]) { ctorType = 'page' - if (mpx.forceUsePageCtor || mode === 'ali' || mode === 'swan') { + if (mpx.forceUsePageCtor || mode === 'ali') { ctor = 'Page' } else { ctor = 'Component'