fis3-postpackager-loader icon indicating copy to clipboard operation
fis3-postpackager-loader copied to clipboard

能否改变all in one打包的文件路径

Open fwon opened this issue 8 years ago • 3 comments

allInOne: { js: '${filepath}.js' }

这样打包${filepath}会把html目录也打包进去,然后生成pkg/html/xxx.js 这里能否自定义路径,别把路径html/也带进去,直接生成pkg/xxx.js

fwon avatar May 12 '16 08:05 fwon

我是这么配置的

allInOne: {
    css: 'pkg/${hash}_aio.css',
    js: 'pkg/${hash}_aio.js',
    ignore: 'require.js',
    sourceMap: false
}

xjchenhao avatar May 17 '16 07:05 xjchenhao

升级fis最新版本,js和css property可以是function了

       postpackager: fis.plugin('loader', {
            allInOne: {
                includeAsyncs: true,
                js: function(file) {
                    return "static/" + file.filename + ".js";
                },
                css: function(file) {
                    return "static/" + file.filename + ".css";
                },
                sourceMap: true //是否生成依赖map文件
            },
            resourcemapWhitespace: 4
        })

zhuzhuaicoding avatar Jul 28 '16 03:07 zhuzhuaicoding

我修改路径也是一直报错,fis版本是v3.4.13,请问也是需要升级么@earlymeme image

shunzizhan avatar Oct 25 '16 06:10 shunzizhan