Skip to content

lice001/gulp-and-webpack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp + webpack 多页打包

安装运行

  • clone 到本地
    npm install

  • 开发模式
    gulp dev

  • 生产模式
    gulp build

注意:

插件修改:

修改gulp-rev源码:

  1. 修改映射表中 属性值的格式: 打开node_modules\gulp-rev\index.js

    // 第135行
        manifest[originalFile] = revisionedFile;
    // 修改为:
        manifest[originalFile] = originalFile + '?v=' + file.revHash;
  2. 修改生成文件的文件名(原来是将 hash 值加入到文件名中,现要文件名保持不变): 打开node_modules\rev-path\index.js

    // 第9行
        return modifyFilename(pth, (filename, ext) => `${filename}-${hash}${ext}`);
    // 修改为:
        return modifyFilename(pth, (filename, ext) => `${filename}${ext}`);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published