We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
问题描述 编译输出的 app.json 格式错误 结果如下:
{} "pages": [ "pages/index/index", //... 第一行错误,后面都是正常的 }
系统信息:
uni-app v2.6.1 uni-app cli v2.0.0-26120200226001 Environment Info: System: OS: Windows 10 CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz Binaries: Node: 12.13.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.17.3 - ~\AppData\Roaming\npm\yarn.CMD npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: 44.18362.449.0 npmPackages: @dcloudio/uni-app-plus: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-app-plus-nvue: 0.0.1 @dcloudio/uni-app-plus-nvue-v8: 0.0.1 @dcloudio/uni-cli-shared: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-h5: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-helper-json: * => 1.0.5 @dcloudio/uni-migration: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-mp-alipay: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-mp-baidu: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-mp-qq: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-mp-toutiao: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-mp-weixin: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-stat: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/uni-template-compiler: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/vue-cli-plugin-hbuilderx: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/vue-cli-plugin-uni: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/vue-cli-plugin-uni-optimize: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/webpack-uni-mp-loader: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @dcloudio/webpack-uni-nvue-loader: 0.0.1 @dcloudio/webpack-uni-pages-loader: ^2.0.0-26120200226001 => 2.0.0-26120200226001 @vue/babel-helper-vue-jsx-merge-props: 1.0.0 @vue/babel-plugin-transform-vue-jsx: 1.1.2 @vue/babel-preset-app: 3.12.1 @vue/babel-preset-jsx: 1.1.2 @vue/babel-sugar-functional-vue: 1.1.2 @vue/babel-sugar-inject-h: 1.1.2 @vue/babel-sugar-v-model: 1.1.2 @vue/babel-sugar-v-on: 1.1.2 @vue/cli-overlay: 4.2.2 @vue/cli-plugin-babel: 3.5.1 => 3.5.1 @vue/cli-plugin-router: 4.2.2 @vue/cli-plugin-vuex: 4.2.2 @vue/cli-service: ^4.2.0 => 4.2.2 @vue/cli-shared-utils: 3.12.1 @vue/component-compiler-utils: 3.1.1 (3.1.1) @vue/preload-webpack-plugin: 1.1.1 @vue/test-utils: ^1.0.0-beta.29 => 1.0.0-beta.31 @vue/web-component-wrapper: 1.2.0 eslint-plugin-vue: ^5.2.2 => 5.2.3 mpvue-page-factory: 1.0.1 mpvue-template-compiler: 1.0.13 uni-h5-vue: 2.6.10 uni-mp-vue: 2.6.10 vue: ^2.6.11 => 2.6.11 vue-cli-plugin-webpack-bundle-analyzer: ^1.4.0 => 1.4.0 vue-eslint-parser: 5.0.0 vue-hot-reload-api: 2.3.4 vue-jest: ^3.0.5 => 3.0.5 vue-loader: 15.9.0 (15.9.0) vue-router: 3.0.1 vue-style-loader: 4.1.2 (3.1.2) vue-template-compiler: ^2.6.11 => 2.6.11 vue-template-es2015-compiler: 1.9.1 vuex: ^3.0.1 => 3.1.2 weex-vue-loader: ^0.7.0 => 0.7.0 npmGlobalPackages: @vue/cli: Not Found
补充信息 node_modules@dcloudio\webpack-uni-mp-loader\lib\plugin\index-new.js 中 generateJson 这一步产生的输出错了,查看 webpack 的 compilation.emits 对象发现除了有一个 app.json 之外还有一个 App.json 追查发现 node_modules@dcloudio\uni-cli-shared\lib\cache.js 中的 changedJsonFileSet 包含 App 和 app 追查发现 node_modules@dcloudio\uni-cli-shared\lib\cache.js 中 updateJsonFile 被以 App 调用过 追查发现 node_modules@dcloudio\uni-template-compiler\lib\auto-components.js 中 updateMPUsingAutoImportComponents 有如下调试结果:
generateJson
compilation.emits
app.json
App.json
changedJsonFileSet
updateJsonFile
updateMPUsingAutoImportComponents
附调用堆栈:
The text was updated successfully, but these errors were encountered:
是否可以提供一个简单的可以重现demo工程,描述清楚重现步骤
Sorry, something went wrong.
App.vue 中有 <template/> 即可复现
<template/>
是否可以提供一个简单的可以重现demo工程,描述清楚重现步骤 App.vue 中有 <template/> 即可复现
已确认,pr已看,你稍微调一下我合并进来
fxy060608
Successfully merging a pull request may close this issue.
问题描述
编译输出的 app.json 格式错误
结果如下:
系统信息:
补充信息
node_modules@dcloudio\webpack-uni-mp-loader\lib\plugin\index-new.js 中
generateJson
这一步产生的输出错了,查看 webpack 的compilation.emits
对象发现除了有一个app.json
之外还有一个App.json
追查发现
node_modules@dcloudio\uni-cli-shared\lib\cache.js 中的
changedJsonFileSet
包含 App 和 app追查发现
node_modules@dcloudio\uni-cli-shared\lib\cache.js 中
updateJsonFile
被以 App 调用过追查发现
node_modules@dcloudio\uni-template-compiler\lib\auto-components.js 中
updateMPUsingAutoImportComponents
有如下调试结果:附调用堆栈:
![image](https://user-images.githubusercontent.com/20750969/75458667-36b6e880-59b9-11ea-933c-0a692776fcde.png)
The text was updated successfully, but these errors were encountered: