We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f22c7ca commit fca5a1fCopy full SHA for fca5a1f
packages/mars-build/src/compiler/script/babel-plugin-script.js
@@ -170,7 +170,7 @@ module.exports = function getVisitor(options = {}) {
170
171
const mpType = isApp
172
? 'app'
173
- : file.config.component ? 'component' : 'page';
+ : (file.config && file.config.component) ? 'component' : 'page';
174
175
if (mpType === 'app' || mpType === 'page') {
176
const fnName = capitalize(mpType);
0 commit comments