chore: 调整 jssdk 产出压缩所有部分 Close: #7249 (#7261)

This commit is contained in:
liaoxuezhi 2023-06-28 18:40:42 +08:00 committed by GitHub
parent fc4c189f35
commit 80974c2c12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 6 deletions

View File

@ -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'],

View File

@ -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;