Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
si-tech opened this issue Aug 31, 2017 · 1 comment

Comments

@si-tech
Copy link

si-tech commented Aug 31, 2017

打包配置:

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
Copy link
Author

si-tech commented Aug 31, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant