Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 百度小程序page使用setup报错 #1288

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/webpack-plugin/lib/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack-plugin/lib/native-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading