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

使用AllInOne的打包方式为什么没生效,我加载了对应的loader了啊 #23

Open
fisherwj opened this issue Sep 22, 2015 · 1 comment

Comments

@fisherwj
Copy link

fis-conf.js配置如下:

// 插件配置
fis.match('::packager', {
//fis-spriter-csssprites 插件 开启雪碧图合并
spriter: fis.plugin('csssprites'),

// npm install [-g] fis3-postpackager-loader
// 分析 __RESOURCE_MAP__ 结构,来解决资源加载问题
postpackager: fis.plugin('loader', {
    resourceType: 'amd',
    processor: {
        '.html': 'html'
    },
    allInOne: true,
    useInlineMap: true // 资源映射表内嵌
})

});

同一html页面的js资源完全没有合并。求解,坐等啊

@lpreterite
Copy link

@fisherwj 看这里!

fis.match('::package', {
    postpackager: fis.plugin('loader', {
        resourceType: 'amd',
        obtainScript: false,
        obtainStyle: false,
        allInOne: {
            css: "pkg/${filepath}_aio.css",
            js: "pkg/${filepath}_aio.js",
            /**
             * 开启后才能打包(allInOne),然后这里需要注意几点
             * 1. 开启后useInlineMap将会失效
             * 2. libs(外部引用的包)也需要使用“组件化包装”,开启isMod自动包装!
             */
            includeAsyncs: true 
        },
        useInlineMap: true, // 资源映射表内嵌
    })
})

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

2 participants