问题原因: - 微信开发者工具的代码依赖分析功能会过滤无依赖文件 - 新增的auth页面可能被误判为无依赖文件 - 导致页面无法正常加载 解决方案: 1. 修改project.config.json - 添加editorSetting配置 - 设置tabIndent和tabSize 2. 修改manifest.json - 添加ignoreDevUnusedFiles: false - 添加ignoreUploadUnusedFiles: false - 禁用开发者工具过滤无依赖文件功能 3. 确保auth页面正确注册 - 在pages.json中注册auth页面 - 设置正确的导航栏样式 解决方法: - 在微信开发者工具中:设置 → 项目设置 → 取消勾选"过滤无依赖文件" - 或在配置文件中设置ignoreDevUnusedFiles为false
30 lines
628 B
JSON
30 lines
628 B
JSON
{
|
|
"setting": {
|
|
"es6": true,
|
|
"postcss": true,
|
|
"minified": true,
|
|
"uglifyFileName": false,
|
|
"enhance": true,
|
|
"packNpmRelationList": [],
|
|
"babelSetting": {
|
|
"ignore": [],
|
|
"disablePlugins": [],
|
|
"outputPath": ""
|
|
},
|
|
"useCompilerPlugins": false,
|
|
"minifyWXML": true,
|
|
"ignoreDevUnusedFiles": false,
|
|
"ignoreUploadUnusedFiles": false
|
|
},
|
|
"compileType": "miniprogram",
|
|
"simulatorPluginLibVersion": {},
|
|
"packOptions": {
|
|
"ignore": [],
|
|
"include": []
|
|
},
|
|
"appid": "wxbae101ca6e1f61e6",
|
|
"editorSetting": {
|
|
"tabIndent": "insertSpaces",
|
|
"tabSize": 2
|
|
}
|
|
} |