fex-team / fis3-packager-map

A packager plugin for fis to pack resources.
BSD 2-Clause "Simplified" License
7 stars 7 forks source link

当被打包的文件组A和文件组B有交集时,文件组B的target会出现丢失文件的情况。 #16

Open si-tech opened 7 years ago

si-tech commented 7 years ago

打包配置:

fis.match('::package', { packager: fis.plugin('map', { // app js 'nresource/js/app.js': [ 'appframe/kernel/jquery-1.10.2.js', 'appframe/kernel/jquery.easing.js', 'appframe/kernel/functions.js', 'nresource/js/bootstrap.min.js', 'nresource/js/respond.js', 'appframe/kernel/require.js', 'appframe/kernel/coreutil.js' ], // app css 'nresource/css/app.css': [ 'nresource/css/bootstrap.css', 'nresource/css/base.css', 'nresource/css/layout.css', 'nresource/css/common.css', 'nresource/css/component.css', 'nresource/css/ui-dialog.css' ],

// index js
'nresource/js/index.js': [
    "appframe/kernel/jquery-1.10.2.js",
    "appframe/kernel/jquery.easing.js",
    "appframe/kernel/require.js",
    "appframe/kernel/coreutil.js",
    "appframe/kernel/functions.js",
    "nresource/js/bootstrap.min.js",
    "nresource/js/jquery.prettyPhoto.js",
    "nresource/js/jquery.isotope.min.js",
    "nresource/js/main.js",
    "nresource/js/wow.min.js",
    "nresource/js/html5shiv.js",
    "nresource/js/respond.min.js"
],
// index css
'nresource/css/index.css': [
    "nresource/css/bootstrap.min.css",
    "nresource/css/font-awesome.min.css",
    "nresource/css/prettyPhoto.css",
    "nresource/css/animate.min.css",
    "nresource/css/main.css",
    "nresource/css/responsive.css"
]

}) })

如上所示,app.js和index.js有内容重复的js,打包之后,index.js中缺失了相交的这部分js。

si-tech commented 7 years ago

目前我的解决办法是建立两个fis-conf文件,第一个用来合并app相关资源,第二个用来合并index相关资源。