diff --git a/examples/embed.tsx b/examples/embed.tsx index 3ff323418..827ade955 100644 --- a/examples/embed.tsx +++ b/examples/embed.tsx @@ -249,6 +249,7 @@ export function embed( richTextToken: '', affixOffsetBottom: 0, customStyleClassPrefix: '.amis-scope', + pdfjsWorkerSrc: '/sdk/thirds/pdfjs-dist/build/pdf.worker.min.mjs', ...env }; diff --git a/fis-conf.js b/fis-conf.js index 989199513..2a9d2acad 100644 --- a/fis-conf.js +++ b/fis-conf.js @@ -147,7 +147,7 @@ fis.match('/node_modules/**.{js,cjs}', { rExt: 'js' }); -fis.match('pdfjs-dist/**.mjs', { +fis.match('pdfjs-dist/**/pdf.mjs', { isMod: true, rExt: 'js', parser: fis.plugin('typescript', { diff --git a/packages/amis/build.sh b/packages/amis/build.sh index 1839f0537..fd18c661c 100644 --- a/packages/amis/build.sh +++ b/packages/amis/build.sh @@ -25,6 +25,9 @@ rm -rf sdk && ../../node_modules/.bin/fis3 release publish-sdk -c -f ../../fis-c cp -r ../../node_modules/monaco-editor/min/vs/base/browser sdk/thirds/monaco-editor/min/vs/base +#pdfjs worker js +cp -r ../../node_modules/pdfjs-dist/build/pdf.worker.min.mjs sdk/thirds/pdfjs-dist/build/pdf.worker.min.mjs + echo "===postcss ie11===" # 生成去掉变量的 css,动画设置为零 echo ':root { --animation-duration: 0s;}' >>sdk/ie11-patch.css