diff --git a/fis-conf.js b/fis-conf.js index 6f758f683..b6760d367 100644 --- a/fis-conf.js +++ b/fis-conf.js @@ -85,9 +85,9 @@ fis.match('/mock/**', { useCompile: false }); -fis.match('mod.js', { - useCompile: false -}); +// fis.match('mod.js', { +// useCompile: false +// }); fis.match('*.scss', { parser: fis.plugin('sass', { @@ -534,7 +534,12 @@ if (fis.project.currentMedia() === 'publish-sdk') { 'barcode.js': ['src/components/BarCode.tsx', 'jsbarcode/**'], - 'charts.js': ['zrender/**', 'echarts/**', 'echarts-stat/**', 'echarts-wordcloud/**'], + 'charts.js': [ + 'zrender/**', + 'echarts/**', + 'echarts-stat/**', + 'echarts-wordcloud/**' + ], 'ooxml-viewer.js': ['ooxml-viewer/**', 'fflate/**'], @@ -838,7 +843,12 @@ if (fis.project.currentMedia() === 'publish-sdk') { 'pkg/cropperjs.js': ['cropperjs/**', 'react-cropper/**'], - 'pkg/charts.js': ['zrender/**', 'echarts/**', 'echarts-stat/**', 'echarts-wordcloud/**'], + 'pkg/charts.js': [ + 'zrender/**', + 'echarts/**', + 'echarts-stat/**', + 'echarts-wordcloud/**' + ], 'pkg/api-mock.js': ['mock/*.ts'], diff --git a/scripts/embed-packager.js b/scripts/embed-packager.js index 78ec4f47d..e26405380 100644 --- a/scripts/embed-packager.js +++ b/scripts/embed-packager.js @@ -15,7 +15,9 @@ var createResource = fis.require('postpackager-loader/lib/resource.js'); function prefixCss(code, prefix) { var cssAst = css.parse(code); prefixNode(cssAst); - return css.stringify(cssAst); + return css.stringify(cssAst, { + compress: true + }); function prefixSelector(sel) { if (sel.match(/^@/)) return sel;