无法从组件 (IE) - SharePoint SPFX 加载条目



我在IE上运行此错误,在Chrome等人上运行良好。

[SPLoaderError.loadComponentError]:
***Failed to load component "3aac0bde-0ef1-46a1-a7f4-216112d395d5" (CompactCustomListWebPart). Original error: ***Failed to load entry point from component "3aac0bde-0ef1-46a1-a7f4-216112d395d5" (CompactCustomListWebPart). Original error: Error loading https://component-id.invalid/3aac0bde-0ef1-46a1-a7f4-216112d395d5_0.0.1
https://component-id.invalid/3aac0bde-0ef1-46a1-a7f4-216112d395d5_0.0.1 did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.
***INNERERROR:
***Failed to load entry point from component "3aac0bde-0ef1-46a1-a7f4-216112d395d5" (CompactCustomListWebPart). Original error: Error loading https://component-id.invalid/3aac0bde-0ef1-46a1-a7f4-216112d395d5_0.0.1
https://component-id.invalid/3aac0bde-0ef1-46a1-a7f4-216112d395d5_0.0.1 did not call System.register or AMD define. If loading a global module configure the global name via the meta exports property for script injection support.
***CALLSTACK:
Error
at t._generateErrorStackForIE (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:4:53963)
at t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:4:53499)
at t (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:20:118832)
at e.buildErrorWithVerboseLog (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:20:128525)
at e.buildLoadComponentError (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:20:124550)
at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:20:115044)
at Anonymous function (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:1:16156)
at F (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:1:16132)
at C (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:1:15977)
at B (https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_6c1243ef07241a9f41fe54d8c7adbc98.js:1:15565)

我已经将gulp clean合并到构建脚本中,因此它总是在构建之前进行清理。

有人建议对 Fabric 的外部 CDN 引用导致了这个问题?我自己怎么捆?

也许是 sp web pnp js 导入使用了较新的东西 - 我是否需要将 poly fill 添加到每个使用 sp 的 tsx 文件中,还是仅添加 mainwebpart.ts? import '@pnp/polyfill-ie11';(https://pnp.github.io/pnpjs/documentation/polyfill/(

你只需要在你的 [webpartname].ts 文件中使用import '@pnp/polyfill-ie11';!所以在你的申请的入口点!从那里它被导入到整个应用程序中,并且可以使用填充物!

问候,乔

最新更新