mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
fix: amis sdk 编译
This commit is contained in:
parent
1064425e3b
commit
073ac28079
28
fis-conf.js
28
fis-conf.js
@ -146,7 +146,20 @@ fis.match('/node_modules/**.{js,cjs}', {
|
||||
isMod: true,
|
||||
rExt: 'js'
|
||||
});
|
||||
fis.set('project.fileType.text', 'cjs');
|
||||
|
||||
fis.match('pdfjs-dist/**.mjs', {
|
||||
isMod: true,
|
||||
rExt: 'js',
|
||||
parser: fis.plugin('typescript', {
|
||||
sourceMap: false,
|
||||
importHelpers: true,
|
||||
esModuleInterop: true,
|
||||
emitDecoratorMetadata: false,
|
||||
experimentalDecorators: false
|
||||
})
|
||||
});
|
||||
|
||||
fis.set('project.fileType.text', 'cjs,mjs');
|
||||
|
||||
fis.match('tinymce/{tinymce.js,plugins/**.js,themes/silver/theme.js}', {
|
||||
ignoreDependencies: true
|
||||
@ -254,7 +267,7 @@ fis.match('*.html:jsx', {
|
||||
|
||||
// 这些用了 esm
|
||||
fis.match(
|
||||
'{echarts/**.js,zrender/**.js,echarts-wordcloud/**.js,markdown-it-html5-media/**.js,react-hook-form/**.js,qrcode.react/**.js,axios/**.js,downshift/**.js,react-intersection-observer/**.js}',
|
||||
'{echarts/**.js,zrender/**.js,echarts-wordcloud/**.js,markdown-it-html5-media/**.js,react-hook-form/**.js,qrcode.react/**.js,axios/**.js,downshift/**.js,react-intersection-observer/**.js,react-pdf/**.js}',
|
||||
{
|
||||
parser: fis.plugin('typescript', {
|
||||
sourceMap: false,
|
||||
@ -343,7 +356,7 @@ fis.hook('node_modules', {
|
||||
});
|
||||
fis.hook('commonjs', {
|
||||
sourceMap: false,
|
||||
extList: ['.js', '.jsx', '.tsx', '.ts', '.cjs'],
|
||||
extList: ['.js', '.jsx', '.tsx', '.ts', '.cjs', '.mjs'],
|
||||
paths: {
|
||||
'monaco-editor': '/examples/loadMonacoEditor'
|
||||
}
|
||||
@ -505,6 +518,8 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'!amis-ui/lib/components/Tinymce.js',
|
||||
'!amis-ui/lib/components/ColorPicker.js',
|
||||
'!amis-ui/lib/components/PdfViewer.js',
|
||||
'!react-pdf/**',
|
||||
'!pdfjs-dist/**',
|
||||
'!react-color/**',
|
||||
'!material-colors/**',
|
||||
'!reactcss/**',
|
||||
@ -564,10 +579,7 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'tinycolor2/**'
|
||||
],
|
||||
|
||||
'pdf-viewer.js': [
|
||||
'amis-ui/lib/components/PdfViewer.js',
|
||||
'pdfjs-dist/build/pdf.worker.min.js'
|
||||
],
|
||||
'pdf-viewer.js': ['amis-ui/lib/components/PdfViewer.js', 'react-pdf/**'],
|
||||
|
||||
'cropperjs.js': ['cropperjs/**', 'react-cropper/**'],
|
||||
|
||||
@ -591,8 +603,8 @@ if (fis.project.currentMedia() === 'publish-sdk') {
|
||||
'!mpegts.js/**',
|
||||
'!hls.js/**',
|
||||
'!froala-editor/**',
|
||||
'!react-pdf/**',
|
||||
'!pdfjs-dist/**',
|
||||
|
||||
'!amis-ui/lib/components/RichText.js',
|
||||
'!zrender/**',
|
||||
'!echarts/**',
|
||||
|
Loading…
Reference in New Issue
Block a user